Uzebox on a Breadboard!

Topics regarding the Uzebox hardware/AVCore/BaseBoard (i.e: PCB, resistors, connectors, part list, schematics, hardware issues, etc.) should go here.
User avatar
Jubatian
Posts: 1563
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: Uzebox on a Breadboard!

Post by Jubatian »

ry755 wrote: Tue Oct 10, 2017 12:01 am Ok, I tried the hex file (I assume you wanted me to use an ISP and not the bootloader to flash it,) and this is what I got: (...)
Thats it in the upper left corner, the first '1' is the code I was describing above. It can not even get past CMD0. The second '1' is the only valid thing after that, all the rest is garbage, literally whatever was in your AVR's memory at bootup since the program can't fill them from the card.

Does it currently work with the old bootloader? Maybe check it, probably a weak soldering gave up on you. If the old bootloader works, I will do some comparison checks as that should also start the same way with a CMD0.

(I gave a .hex so you can use the ISP as it seemed like the bootloader can't reliably program on your hardware, so I wanted to rule out anything because of bad reads)
User avatar
ry755
Posts: 226
Joined: Mon May 22, 2017 6:01 am

Re: Uzebox on a Breadboard!

Post by ry755 »

Yes, the old bootloader works perfectly fine. Although, I'm not using the normal 0.4.5. I'm using Harty123's modded 0.4.3 bootloader with the slower speed. Also, once I plugged the sd breakout board directly into the breadboard and used shorter wires, I got more successful flashes. The flashing almost never fails now.
User avatar
Jubatian
Posts: 1563
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: Uzebox on a Breadboard!

Post by Jubatian »

ry755 wrote: Wed Oct 11, 2017 2:10 amYes, the old bootloader works perfectly fine. Although, I'm not using the normal 0.4.5. I'm using Harty123's modded 0.4.3 bootloader with the slower speed. Also, once I plugged the sd breakout board directly into the breadboard and used shorter wires, I got more successful flashes. The flashing almost never fails now.
In the most recent version of the new loader I changed the initialization process slightly. Maybe it will work now.

The very weird thing is that the original bootloader just slaps the SPI to max speed without even waiting for the card, pretty much violating how a card should be normally initialized, just about every other SD library which exist around the kernel does it better (or at least they look like following the specs better). I originally started out with sdBase, now the beginning of the init more resembles to what was in the original bootloader (especially Harty's, but the slower SPI clock at that point was already there from the start as it is required by the cards).
User avatar
ry755
Posts: 226
Joined: Mon May 22, 2017 6:01 am

Re: Uzebox on a Breadboard!

Post by ry755 »

Jubatian wrote: Wed Oct 11, 2017 8:13 pm In the most recent version of the new loader I changed the initialization process slightly. Maybe it will work now.
Nope, it still says "Insert SD Card" with all 3 sd cards. :(
User avatar
Jubatian
Posts: 1563
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: Uzebox on a Breadboard!

Post by Jubatian »

ry755 wrote: Thu Oct 12, 2017 12:12 am
Jubatian wrote: Wed Oct 11, 2017 8:13 pm In the most recent version of the new loader I changed the initialization process slightly. Maybe it will work now.
Nope, it still says "Insert SD Card" with all 3 sd cards. :(
I attached further tests. Same display, one is with the 5.0.03 bootloader, the other one is with the init what Harty uses (if the source really corresponds the binary). The latter one might not get past ACMD41 (so might return error code 4) due to that it runs at higher speed and so doesn't wait enough, but now the point is getting past CMD0 (error code 1).

If the latter works, maybe try to look for things on your hardware which might especially hinder slow communication (like anything which could act as a DC filter at the slower speed). It would indicate something is present there that pulls your signal away from the intended level (either of the three: MOSI, MISO and SCK). SD cards are described requiring the slower speed at init, so you should really try fix it then (anyway, sure that's a weird thing, that especially slow communication fails).
Attachments
sdlibdem.hex
With Harty's timing
(37.52 KiB) Downloaded 375 times
sdlibdem.hex
With the SD library for the 5.0.03 bootloader
(37.52 KiB) Downloaded 392 times
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: Uzebox on a Breadboard!

Post by Artcfox »

I looked again at the photo you posted, and it looks like you're using a very long piece of ribbon cable to connect the SD card breakout board to your circuit. That's probably why you're having such trouble with it. Those wires should be as short as possible, and you should place it as close as you can to the AVR.

If you have a microSD to SD adapter that you're willing to sacrifice, you can solder a .100" pin header across the pins that you need, and use that with a microSD card as a cheap breadboard adapter.

This is how I made mine years ago, before I designed a proper board with an IC-based level shifter:
2011-12-13.jpg
2011-12-13.jpg (109.01 KiB) Viewed 13577 times
And then you can plug it directly into your breadboard like this, and then insert a microSD card:
2011-12-13(1).jpg
2011-12-13(1).jpg (135.94 KiB) Viewed 13577 times
Use flux, and be quick so you don't melt the plastic on the adapter.
User avatar
ry755
Posts: 226
Joined: Mon May 22, 2017 6:01 am

Re: Uzebox on a Breadboard!

Post by ry755 »

Same thing. Both show "1 1". Also tried using shorter wires. I don't really want to spend more time trying to get this thing working, so I think I'll just buy the official kit from Adafruit. (Might take a little while to save up some money because I'm just a broke teenager :roll: ) Because no matter how hard we try, anything like this built on a breadboard will always have something not working right.

EDIT: Also, sorta off topic question, does the Adafruit kit come with the new v1.3.1 PCB with Uzenet instead of MIDI? The pictures show the older one, but I thought I read somewhere that someone got the new v1.3.1 version from Adafruit.
User avatar
Jubatian
Posts: 1563
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: Uzebox on a Breadboard!

Post by Jubatian »

ry755 wrote: Thu Oct 12, 2017 11:28 pmSame thing. Both show "1 1". Also tried using shorter wires. I don't really want to spend more time trying to get this thing working, so I think I'll just buy the official kit from Adafruit. (Might take a little while to save up some money because I'm just a broke teenager :roll: ) Because no matter how hard we try, anything like this built on a breadboard will always have something not working right.
Could you still do another test? :) I mean I realeased a new bootloader version again (5.0.05), for which I actually spotted a significant difference in the old bootloader's method of handling SD cards. If that was the culprit, then this version might work with your breadbox!
User avatar
ry755
Posts: 226
Joined: Mon May 22, 2017 6:01 am

Re: Uzebox on a Breadboard!

Post by ry755 »

*sigh* No, still does the same thing. :cry:
User avatar
Jubatian
Posts: 1563
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: Uzebox on a Breadboard!

Post by Jubatian »

ry755 wrote: Sat Oct 14, 2017 12:12 am*sigh* No, still does the same thing. :cry:
I did an upgrade again, which again introduced a slight change in SD interfacing. Maybe this will do something on your breadboard.
Post Reply