Hi just starting out using pic basic pro and PICs in general and have some basic questions on writing and reading the values into eeprom PIC (12F683) if someone can give some input
i wish to write the captured measured values of pulsin directly to the pic for IR code (32 bits) on a pic running internal at 4mhz and generate the same pulse streem out with the correct timing from the stored values
if a value of say 150 is recieved - then this would be 150 x 10us = 1.5ms pulse i believe
using the following code would values stored higher than 255 be read back correctly ? , if not what coding would
regards
Code:
Leader VAR WORD ' will be up to 900 for a 9mS leader pulseBtnVal VAR BYTE[32] ' holds 32 pulse results
FOR X = 0 TO 31 ' grab 32 incoming pulses
PULSIN GPIO.0,1,BtnVal(X) ' now measuring high-going pulse widths
NEXT X
x = 0
for x = 0 to 31 ' store timed values in pic
write x , BtnVal(X)
pause 1000 ' wait 10ms before writing next value - not sure if required will reduce / remove after testing
next X
Bookmarks