retepsnikrep wrote:Good point I need to adjust that so it sends data from the current I2CAddress point until it catches up with itself. So it sends the full 64k data on every dump. I'll think about that a bit more.
How about something like this;
Code: Select all
DumpData: ;Sends Stored EEPROM BMS data to remote display and/or PC Logger
;Txd sends 5 byte preamble to lock with Rxd, then qualifier "bms"
;followed by control code and then data. Data rate is limited to
;2400 baud and 64kbyte may take upto 4 minutes to transmit
serout Video,BaudT9600,(27,67,"Sending ",#I2CAddress,10,13,"Bytes Be Patient") ;Video Display
serout DriveInhibit, BaudN2400, (0x55, 0x55, 0x55, 0x55, 0x55) ;Txd 5 byte preamble to clear Rxd
pause 10 ;Pause for 5ms to allow serial rxd to clear
serout DriveInhibit, BaudN2400, ("bms",1) ;Txd Qualifier and control code (1) (2400 baud at 8mhz)
pause 10 ;Pause for 5ms to allow serial rxd to clear
for VarA = 0 to 65535 ;SUGGESTED CHANGES
inc I2CAddress ;SUGGESTED CHANGES
hi2cin I2CAddress,(b0) ;SUGGESTED CHANGES
serout DriveInhibit, BaudN2400, (b0) ;Txd BMS Data byte via 443mhz Tx 2400 baud
toggle WatchDogLed ;Keeps watchdog happy, Prevents alarm during data transmision
next VarA ;Repeat loop until all eeprom data sent
serout DriveInhibit, BaudN2400, (255) ;Txd BMS Data end flag (255) via 443mhz Tx 2400 baud
goto ExitMenu ;Returns to main program loop