Equip your Genius
Welcome to the Parallax Discussion Forums, sign-up to participate.
Learn with BlocklyProp
BS-2 READ timing
2020-12-07 (8:16 PM)
I have recently done some experiments that suggest the BS-2 READ statement takes roughly 1 msec per byte. (Don't ask why). This seems to be VERY ssslllllooooww.
Can anyone confirm or deny?
Thanks for your kind attention.
2020-12-07 (8:19 PM)
I wonder if I loaded in hex to a blank PIC16F, if the timing would be slow
2020-12-07 (9:00 PM)
The only way to confirm is with a 'scope. I did a project a long time ago with a BS2 that needed a 100ms loop time, regardless of the path taken through the loop. I used a spare pin and a TOGGLE instruction to flip its state each time through, using a 'scope to measure. It took a couple days to pad the code, but I got as near to 100ms through the loop, no matter the program state.
2020-12-07 (9:56 PM)
This is my PIC16Fxxx hex, set Porta to output, turn on portA
You add turn off and clock it with your scope, on, off, on, off etc.
2020-12-07 (10:17 PM)
I had used a scope and I guess it is what it is. Just couldn't believe it. Even the BS-2pe, takes 100s of usec to do a GET.
2020-12-07 (10:28 PM)
This is the PIC16F57 instruction cycle timing.
PIC16F57 Instruction cycle.pdf
2020-12-08 (12:38 AM)
edited 2020-12-08 (12:38 AM)
I did similar tests back some time ago.
What I have written there for a READ 0,x command on the BS2 is 550µs.
Both GET and PUT took a little more than 200µs each, and, not surprisingly, WRITE came in at 6000µs and depended more on the eeprom.
I don't know why READ took that long, but it does require several eeprom accesses coming and going.