Last week I made small breakout board for SD card
and downloaded great fatfs by elm-chan. Make it run was only question of few minutes (did I mention I'm writing the software in plain C, instead of C/C++ mixture as usual for Arduino?), involving witing the SD adaptor to main board and rewriting a few hardware dependant bits. For now I decided to stick with bitbanged SPI for SD card (download example projects and look for avr_foolproof directory) as only few (tens) kilobytes will be read/written from time to time, so it's going to be fine, probably. I haven't done any speed testing, but I expect something in order of few dozens of kilobytes per second.
I wrote a piece of code to excercise the SD card (writing short file into root directory) and display status:
Great! So both display and SD card work, consuming some 12kB of FLASH.
Now I need to add keyboard and sire some target AVR! Because there will not be enough of IO lines, I opted to use I2C expander PCF8574A (because I had a few in my junkbox - I think of using another I2C IO expander in final hardware) on shared bus with OLED display - this way I can connect 4x4 keyaboard with no additional IO lines, compared to 8 lines consumed by classical matrix design.
You can see PCF8574A in front, with 8pin pinheader for keyboard and ATtiny2313 in middle, serving as first guinea pig for ISP experiments.
In following days I'm going to try to make ISP contact of ATmega328 with ATtiny2313, it doesn't look very complicated, after quick skimming through ATtiny2313 datasheet.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.