[Sdcc-user] read microchip device id register

2014-06-17 Thread stoffer
Hi, I am looking for a way to get the Device ID Register at address 3Fh and 3Eh is Generic Pointers the way to go? but then those two adresses should be in code? Make no sense... uint8_t *eeprom = (void *)0xe; or are there another way? --

Re: [Sdcc-user] read microchip device id register

2014-06-17 Thread stoffer
On Jun 17, 2014, at 10:59 PM, stof...@skulp.net wrote: > > uint8_t *eeprom = (void *)0xe; this seems to work: unsigned int dev_id() { unsigned char dev_id_low, dev_id_high; TBLPTRU = __DEVID1 >> 16; TBLPTRH = __DEVID1 >> 8; TBLPTRL = __DEVID1; __asm