BE CAREFULL: Only call this function on "startup" of the PICŪ to avoid wearing the EEPROM.
It still is not a "real" random number but it is a quite good solution for those with no external resources able to generate a random number.
Code:
SYMBOL SEED_POSITION = 0 DIM tmp_seed as WORD 'INITIALIZATION '=========== tmp_seed.lowbyte = EREAD SEED_POSITION tmp_seed.highbyte = EREAD SEED_POSITION + 1 SEED tmp_seed INC tmp_seed EWRITE SEED_POSITION, [tmp_seed]


Menu
Recent Articles


Using PDS with SPI GLCD based on ST7565R Controller
Graphic LCDs based on the ST7565 are cheaper then GLCDs with other controllers. SPI requires only four pins. If the circuit