Initial Power With Flash Programmer CPLD
I plugged in the CPLD and powered up.
I ensured that I had 0V on the ground lines and 5V on the VCC lines.
Then I attached the Arduino ENABLE pin to pin 38 of the CPLD. And aimed a command line terminal to my directory with the C# flashProg.exe program.
I enabled the pins with:
flashProg.exe pins 1
and then set them all low with:
flashProg.exe direct 0
This makes 2 of the address lines I tested solidly 0. Meaning, I hooked up a multimeter and saw the voltage go to 0. If I tap the lead, it stays at 0. Then I entered:
flashProg.exe direct f
Now these lines float the address lines I tested. That is, if I tap the lead, the voltage on the multimeter bounces around. A characteristic of floating lines.
So, ENABLE does drive and float the address lines as it should. At least the 2 I tested. I now have confidence that I’m on the right track. I’ll do a bunch of testing this afternoon and hopefully, start to use some of the more complex features of flashProg.exe.
BTW, the help (so far) for the flashProg.exe is this:
flashProg: a PC interface to an Arduino that talks to a CPLD that talks to flash
Usage:
Note that in the following, [addr] and [data] must be hex
flashProg nop
Just checks the connection
flashProg reset
Resets the CPLD
flashProg pins [0|1]
Enables pins for output (1) or makes them all inputs
flashProg wb [addr] [data]
Writes a byte data to addr in flash
flashProg rb [addr]
Reads a byte data from addr in flash
flashProg direct [0-f]
directly write pins. msb to lsb: ctrl, din, clk, enable
flashProg write [addr] [len] [binaryFileName]
Writes a binary file addr in flash up to len bytes
flashProg read [addr] [len] [binaryFileName]
Reads len bytes from addr in flash to a binary file
flashProg erase [addr]
Erases the sector in flash containing addr
flashProg eraseall
Erases the entire flash
So you can see some of the features I plan for this.
My plans now are to ensure that the address and data lines work properly by sending them different values. Then that the CS, RD, and WR work. Once they all seem to work as expected, I’ll out the flash part in and wire-wrap. Then, try to read and hopefully get 0xff. Then try to program and hopefully get a toggling DQ6 or at least a written byte if it’s too slow.
I’ll post the Arduino and flashProg code later today.