Hello, I tried researching this for hours before posting, and this is my last ditch effort to hopefully find a solution to save my project. I know there are plenty of helpful people far more experienced than I am and I hope they can point me in the right direction.
My goal is to use an Arduino Nano (specifically a Keyestudio clone) to be able to read and write to a 28C256 EEPROM. The external hardware that will allow me to do this is two HC595 shift registers which will control the address pins.
I have made an EEPROM Programmer before, following along with Ben Eaters amazing electronics videos, however this was for more structured data, and now I am trying to take a binary file and write each byte in order to the EEPROM. The main problem I am running into is the limitations the Arduino Library supports. Normally I could just use a library like:
#include <iostream> #include <fstream>
However, these libraries are not supported from what it seems and I cannot figure out a way to get the functionality of a stream into my code. I have so far a write and read command which can display information to the serial monitor, and I understand Arduino has Streams available using SD cards, Wire, Ethernet, and Serial, however, my NANO does not support ethernet or SD cards and the Wire and Serial Streams seems to only interface with two pins each (RX D0 and TX D1 for Serial; A4 SDA and A5 SCL for Wire). I want to be able to take a stream which affects all of the pins the nano has to offer so I can set the address, set the data and then pulse the write enable.
I have basically all the code and hardware set up, but I got to this last piece and it is just tearing me apart. I feel like there should be a way to achieve what I am trying to do, but I can’t seem to find it. I was looking into the SerialEvent() method, but this seems to only update when new data is coming into the arduino from the Hardware Pin RX. This will not produce what I want. I need to control it from the computer, not an external source.
I feel confident in my coding and hardware abilities if the right tools are presented to me, but all I am getting so far is that the Serial Stream and Wire Streams let me read or write from two pins each, not even including the fact that they don’t take file input which is highly desired for robust function.
Again, the desired outcome is to read a raw binary file with the data I wish to print onto the EEPROM. I cannot find support for this kind of functionality, and I would even settle for copying the data into a string for parsing, but this requires
which again is not supported to my knowledge unless there is an amazing work around. I heard about the STL port to Arduino, but I do not know if it is worth going down that rabbit hole, could my solution be there? Will check back in the morning, its 2:00 am where I am right now, Good Night and Thank You dearly for any help! Sincerely, Jace Cockayne