This time going for serial input of a string terminated with either 0x00 or 0x0D (or any value below 0x20 really) into an array.
So far one byte, and untested, but I do have a PBP program on 16F628A ready to test and use it when done.
It’s on the receive side where I want serene replaced because I can keep going with my own data until the program memory is full.
Code:rxbyte var byte count var byte delay var byte shortdelay var byte delay = 100 ‘ actual serial timing shortdelay = 50 ‘ time/2 serinbyte: IF PORTB.1 = 1 THEN ‘ optional countdown to timeout here GOTO serinbyte ENDIF pauseus delay pauses shortdelay FOR count = 0 TO 7 rxbyte.bit7 = PORTB.1 rxbyte = rxbyte >> 1 pauseus delay NEXT count pauses shortdelay rxbyte = rxbyte ^ $FF return




Bookmarks