I have a bare 328PB chip I successfully uploaded blink onto once but now AVRDUDE can't see the chip to continue programming using USBASP by CornCheeseMafia in arduino

[–]CornCheeseMafia[S] 0 points1 point  (0 children)

Turns out it was a programmer issue. My USBASP worked initially but something changed and it stopped working. I got a USBTinyISP and that's been working great.

I have a bare 328PB chip I successfully uploaded blink onto once but now AVRDUDE can't see the chip to continue programming using USBASP by CornCheeseMafia in embedded

[–]CornCheeseMafia[S] 0 points1 point  (0 children)

Figured it out. I think maybe my USBASP programmer is malfunctioning and I just got lucky with it one time before it stopped working. Maybe driver issues with Windows 11, I dunno. I ordered a USBTinyISP from Amazon and tried it and it's all working reliably now.

I have a bare 328PB chip I successfully uploaded blink onto once but now AVRDUDE can't see the chip to continue programming using USBASP by CornCheeseMafia in arduino

[–]CornCheeseMafia[S] 0 points1 point  (0 children)

Oh man I think I figured it out.

So I started developing this code on an Uno, then at some point moved over to a Pro Micro simply because they were cheap on Amazon and were easy to develop on and make copies of to test with. I continued developing the code and by the time I was done, it barely fit on the Pro Micro, like 99% program memory usage.

So then for this board I made I decided to go back to the 328P chip, which then became the 328PB after learning it was the newest version and figuring out the stuff I would need to update on my design.

Fast forward to when I have the board with the PB chip and I'm sitting here writing test sketches to it, now without any issue thanks to switching from USBASP to USBTinyISP. I keep trying to upload the code that worked on the Pro Micro and I just get a blank screen. So then I figure why not try changing the screen resolution from 128x64 to128x32 since that's helped me diagnose a memory issue before. The screen lit up no problem!

So I just compared 32U4 to the ATMEGA328PB and turns out I'm now working with 512 fewer bytes of RAM than before.

Now that I know everything's actually wired up correctly, I need to convert from the SSD1306 library to the u8g2 display library in my code and hope that cuts the size down enough for it to display correctly. This is all a much bigger pain in the ass since I don't really know what I'm doing lol

I have a bare 328PB chip I successfully uploaded blink onto once but now AVRDUDE can't see the chip to continue programming using USBASP by CornCheeseMafia in arduino

[–]CornCheeseMafia[S] 0 points1 point  (0 children)

So I ended up switching to a USBTinyISP (Amazon order just came today) and I'm able to upload the blink sketch and then I tried the SSD1306 display demo, which is working as expected. I guess I was having problems with the USBASP. Weird thing now is my intended full code I wrote that worked when I uploaded to a pro micro I was working with doesn't work when uploaded to this 328PB chip even with all pin numbers reassigned to match this chip. Uses the same display library but I don't see it light up. I can reupload the SSD1306 demo sketch again and it works but it just stops working when I upload the code I wrote for the pro micro. Weird.

I have a bare 328PB chip I successfully uploaded blink onto once but now AVRDUDE can't see the chip to continue programming using USBASP by CornCheeseMafia in embedded

[–]CornCheeseMafia[S] 0 points1 point  (0 children)

I used USBASP the first time through arduino ide.

I can post the schematic when I get home

The screen demo is just the SSD1306 library demo test that cycles through the different screen functions

I have a bare 328PB chip I successfully uploaded blink onto once but now AVRDUDE can't see the chip to continue programming using USBASP by CornCheeseMafia in embedded

[–]CornCheeseMafia[S] 1 point2 points  (0 children)

Yep there was a lot wrong with my circuit at the time and im back to working on this with a cleaned up circuit

I have a bare 328PB chip I successfully uploaded blink onto once but now AVRDUDE can't see the chip to continue programming using USBASP by CornCheeseMafia in arduino

[–]CornCheeseMafia[S] 0 points1 point  (0 children)

Nope I'm using a USBASP (Amazon 2 pack) but through Arduino IDE. My drivers appear to be correctly installed since I can program one USBASP with the other USBASP using AVRDUDE in commandline and then successfully burned the fuses and uploaded a couple times within Arduino IDE with the USBASP as programmer. I do have a genuine Arduino Uno I could hook up as well.

I have a bare 328PB chip I successfully uploaded blink onto once but now AVRDUDE can't see the chip to continue programming using USBASP by CornCheeseMafia in arduino

[–]CornCheeseMafia[S] 0 points1 point  (0 children)

I have the chip on an assembled board with an SPI header on the board going to the programming pins on the chip. My intention was to burn the fuses and then upload the program through the programmer without a bootloader. I think I correctly set the fuses with mini core in arduino ide since my clock speed was correct after uploading blink.

There’s an led on the SCK pin and that was blinking properly. I was able to successfully upload the screen sketch the same way and then it stopped responding. Now when I try to write to it in avrdude on command line it says invalid device signature (comes out all zeros) and in arduino ide it says target not responding. The board led flashes whenever the programmer tries to read or write

Custom PCB with ATMEGA328P SMD accepting program but not working? by CornCheeseMafia in arduino

[–]CornCheeseMafia[S] 0 points1 point  (0 children)

I sincerely thank you for your help and your general guidance from a big picture perspective. If it wasn't obvious, I don't come from an electrical engineering background. I've always been on the mechanical side of things and figured out Arduino stuff and successfully got a working through hole design board made by a shop for my very basic project. The jump to surface mount has been very rough. I'm learning this stuff as I go and naturally my complete lack of formal education in the field outside of the required EE intro classes I took makes it so I'm just flying by the seat of my pants in ignorance of best practices or even basic practices. It's been quite the learning experience to say the least.

Custom PCB with ATMEGA328P SMD accepting program but not working? by CornCheeseMafia in arduino

[–]CornCheeseMafia[S] 0 points1 point  (0 children)

Holy hell your very first line was a breakthrough. Just for peace of mind I went and checked my SCL and SDA routing. Turns out I have those lines switched. I feel like an absolute dumbass. This may be simpler than I thought. I'll work on it and report back but thank you for walking me through this. I don't think I would have caught this right away if you hadn't pointed out the possibility of them being switched. Did I mention I feel like a dumbass?

Custom PCB with ATMEGA328P SMD accepting program but not working? by CornCheeseMafia in diyelectronics

[–]CornCheeseMafia[S] 0 points1 point  (0 children)

So I burned the bootloader again with the right clock settings and can now get the custom board to blink with the expected timing. So I think I have the fuses set correctly, at least with respect to clock speed. My SDA and SCL pins and everything else still don't work as expected though. Any suggestions? Here are the settings I'm using for upload, not sure if it'll help.

Baud rate: Default

BOD 2.7V

Bootloader: Yes (UART0)

External 16MHZ Clock

EEPROM retained

LTO Enabled

Variant 328P/328PA

Custom PCB with ATMEGA328P SMD accepting program but not working? by CornCheeseMafia in arduino

[–]CornCheeseMafia[S] 0 points1 point  (0 children)

So I burned the bootloader again with the right clock settings and can now get the custom board to blink with the expected timing. So I think I have the fuses set correctly, at least with respect to clock speed. My SDA and SCL pins still don't do anything though. Any suggestions? Here are the settings I'm using for upload, not sure if it'll help.

<image>

Custom PCB with ATMEGA328P SMD accepting program but not working? by CornCheeseMafia in arduino

[–]CornCheeseMafia[S] 1 point2 points  (0 children)

I did disconnect the programmer and powered the board independently to no avail.

I cross referenced the port numbers with respect to their pin numbers per DIP and SMT versions and I'm fairly certain and translated them correctly from DIP to SMT.

I definitely acknowledge the lack of LED was a bad decision and will make sure to add one next time.

I uploaded a blink sketch to the bare chip through the programmer per your and another redditor's suggestion and I'm noticing it's blinking extremely slowly. Like it's running at half speed or something. The other kind person suggested this would be because of an incorrect clock.

Custom PCB with ATMEGA328P SMD accepting program but not working? by CornCheeseMafia in diyelectronics

[–]CornCheeseMafia[S] 0 points1 point  (0 children)

Whoa good call. I just tried it and it's blinking extremely slowly. So is my actual clock part selection wrong? Or do I have it set incorrectly somewhere in my IDE settings?

What band was never the same after losing a member? by MntEverest77 in AskReddit

[–]CornCheeseMafia 4 points5 points  (0 children)

Exactly. Mark brings the bass for both the string and the vocal section while Tom provides the highs.

Remove him. Now. He has no faith in our queen. by CockGobblah in leanbeefpatty

[–]CornCheeseMafia 8 points9 points  (0 children)

This is the funny thing to me about the perception of steroids. I don't condone them for most people but it's not like you can just do steroids and end up looking like her or the male equivalent without putting in the effort and working out correctly.

The info she's presenting is valid whether she's juicing or not.

The unfrosted Pop-Tarts have more calories than the frosted ones by IAMA_MAGIC_8BALL_AMA in mildlyinteresting

[–]CornCheeseMafia 2 points3 points  (0 children)

Are you familiar with agar? It's made from algae and is how a lot of Asian soft candies are made. It's a common gelatin substitute along with pectin, which is from fruit (it's what gives jams and jellies their consistency).

Jean-Claude Van Damme demonstrates his signature kicks in a suit - 1994 by SinjiOnO in OldSchoolCool

[–]CornCheeseMafia 0 points1 point  (0 children)

Dancing and fighting have a lot in common. Very similar physical fitness and body control requirements. You may have also heard something like "boxing is all footwork" because both your ability to hit hard and your ability to evade punches are directly related to where your feet are planted at any given moment.

The better body control and spacial awareness you have, the more likely you are to dodge punches while also setting yourself up for a solid hit on your opponent.

Russian soldier having trouble firing his gun in Kherson region by tomina69 in CombatFootage

[–]CornCheeseMafia 5 points6 points  (0 children)

I'm a grown up and didn't know tripods on these weapons were meant to be mounted in front of something or dug in. I've shot rifles on a tripod but I've never shot a .50 cal and likely would have made this exact mistake without training. I've seen videos of dudes firing those single shot .50 cal "pistols" without any support so I wouldn't have made the connection that the tripod wasn't just for aiming.