Today came in the Atmega644P’s in TQFP package I scored on eBay. Today I’m focussing on the SD2IEC part of the RAM cartridge. I was a bit scary to order them there as ebay is wellknown for knockoffs, nonworking or rebadged stuff. Even the big players will sometimes fall into this trap (https://www.sparkfun.com/news/350). However it seems to be working (avrdude is capable of reading the ID and seem to program them correctly) Is it my lucky day?!

buspirate_rescueWhen designing this board, which I do usually at night after work, I tend to make little sloppy mistakes (I will write a post about that) and things turn out not as easy after receiving the PCB’s. Notice there aren’t any pins or testpads for an ICSP connection? Because there aren’t any 🙂 I  desoldered the Atmega and put it onto an old protoboard I designed ages ago and go my trusty old buspirate out. Programming took ages (a whopping 2097 seconds to write and 2087 seconds to verify) for just a 10k Hex file (I choose to upload only a bootloader), but seems to be programming the chip ok. Next I also programmed the fuses. and prepared a microsd card with the SD2IEC firmware on it and stick it into the memorycard holder.

iec_internalI soldered the chip back on the ramcart and before connecting it to my (expendable) C64 I checked the cartridge for shorts with a DVM. As it reads several K’s of resistance both  ways on the supply pins I felt confient and connected it to my C64. I went for the option to solder the IEC bus directly to the C64 mainboard as I didnt have a IEC cable I wanted to cut. It appears the the IEC lines are easily accessable on the bottom of the main board (left to right GND, DAT, CLK and ATN).

I powered it on and I got a familar blue screen (which is normal on C64’s kiddo’s 😉 ). I tried to read the directory but the red light started to flash indicating something was wrong. Next i tried to read the errorchannel of the drive, but I only got garbage on the screen. Something was terrible wrong with it and I didn’t have a clue. I was worried something went wrong while writing the firmware or fuses… However it appear by looking at the LEDs it was reponding correctly to commands, also when i tried to access an other drive (i.e. 9 or 10) it gave me a DEVICE NOT FOUND ERROR.

I took out the cart and checked the soldering of the chips and connection to the C64, which all seems to be ok. Next I checked the schematic to the one that inspired me (actually i only converted it to a SMD and used a microsd card). All the connections seems to be consistant.. I also checked if there is something wrong with silkscreen but that was the case either. The website from which I used the schematic had experienced something simular and his mistake were the fuses. I was pretty sure I had them right and I doublechecked the components and noticed the crystal on the board was 16MHz instead of 8MHz. I desoldered it and replaced it with the required 8Mhz.

ramcart_bodgeExcited I tried to reconnect everything and it appears to work now! Reading the errorchannel right after start gave me “SD2IEC v0.10.3” but reading the directory gave me a FILE NOT FOUND ERROR.. I was puzzled a bit as the firmware was loaded from the microsd card correctly. I then remembered the other guy used a big SD slot which has a carddetect line, i rechecked the schematic and that line was connected to a pin on the microcontroller. I quickly bodged on a small wire and shorted the pin to ground. Next I tried again and now it lists the rootdirectory of the uSD card. I guess every project deserves a revsion 2.

ramcart_succes

Share this