Hello,
I need to save a word var that i receive trought serial communication on the pic eeprom
With byte vars i use like: write 12, $80
If i need to write to or read from the eeprom the value 1234 how must do it?
Thanks
Best regards
visitac
Hello,
I need to save a word var that i receive trought serial communication on the pic eeprom
With byte vars i use like: write 12, $80
If i need to write to or read from the eeprom the value 1234 how must do it?
Thanks
Best regards
visitac
What version of PBP do you have? Have you checked the manual?/Henrik.Code:myValue VAR WORD myValue = 1234 WRITE 12, WORD myValue
hendric , the var is written with the LSB first at the location , is there a way to make it the MSB first with the write command ?
Why do you care? If you use READ to get the value back I'd be very surprised if it read in the wrong byte order.
Anyway, I don't know of any DEFINE or anything to change it so, if you really need reverse the byte order, I'd probably try something like:/Henrik.Code:Value VAR WORD temp VAR WORD Value = $1234 ' Some value temp.lowByte = Value.HighByte temp.highByte = Value.LowByte ' temp is now $3412 WRITE 0, WORD temp
Bookmarks