#chip 16F628
'Read table item
'Must use ReadTable and a variable for the index, or the table won't be
' downloaded to EEPROM
TableLoc = 2
ReadTable TestDataSource, TableLoc, SomeVar
'Write to table , this is not required
EPWrite 1, 45
'Table of values to write to EEPROM
'EEPROM location 0 will store length of table
'Subsequent locations will each store a value
Table TestDataSource Store Data
12
0b00000010
36
48
60
72
End Table
This generatesa table as expected.
TableTESTDATASOURCE equ 0
de 6, 12, 2, 36, 48, 60, 72
END
So, version of compiler please. Post your actual code. I think you have not shared the error, what is happening that is not expected.
More inormation please.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
#chip mega328p,16
#option explicit
#define USART_BAUD_RATE 9600
#define USART_TX_BLOCKING
#define USART_DELAY 10 ms
dim temp as byte
do
readtable mytable,1,temp
HSerPrint str(temp)
loop
table MyTable as byte
0b00000010
End Table
edited do but same results
I think @Robert uses a uno from other posts
Last edit: stan cartwright 2018-06-20
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This works:
Table MyTable as byte
2
End Table
This does not work:
Table MyTable as byte
0b00000010
End Table
The table item is always read as 0. Can anyone tell me why?
Thanks,
Robert
Not sure. The following works here.
This generatesa table as expected.
So, version of compiler please. Post your actual code. I think you have not shared the error, what is happening that is not expected.
More inormation please.
This prints 2's
edited do but same results
I think @Robert uses a uno from other posts
Last edit: stan cartwright 2018-06-20