Is the "mem_off" variable word size? The 24C64 uses a word sized address. Your variable "mem_off" is being sent as the address. Also, just asking, but you do have the A0:A2 pins on the IC grounded for the device address "1010000", right?
Your lines:
Code:
ram[F05_HI] = MyWordRd/256 'This register can be read over modbus
ram[F05_LO] = MyWordRd
are a bit odd and are going to run up a lot of code space. I'd use:
Code:
ram[F05_HI] = MyWordRd.Highbyte
ram[F05_LO] = MyWordRd.Lowbyte
Last edited by JD123; - 15th April 2008 at 17:07.
No, I'm not Superman, but I did stay at a Holiday Inn Express last night!
Bookmarks