SPI Issue
Posted: Mon Feb 26, 2018 10:05 am
Hi
I have a 18F46K22, using FC6 (6.1.2.0) that uses a device on spi bus
running the processor on 16mhz, with Fosc/4 (4mhz spi) setting for spi bus....i get correct
operation of the device(ADXL345 acc)...device_ID register correct (0xE5)
If i run the processor at 64mhz PLL....with Fosc/16 (also 4mhz spi)....i get a strange
reading back from the device_ID register (0xE4)....which indicates a dropped bit (lsb)
in that value when read out from the ID register...and other subsequent values from
other registers are not correct
Since spi bus is clocked at same speed (4mhz...in spec of chip which is max 5mhz)....i am
now stuck...dont know how to resolve this
I tried a delay after CS on the device but also no luck
Any ideas?
I have a 18F46K22, using FC6 (6.1.2.0) that uses a device on spi bus
running the processor on 16mhz, with Fosc/4 (4mhz spi) setting for spi bus....i get correct
operation of the device(ADXL345 acc)...device_ID register correct (0xE5)
If i run the processor at 64mhz PLL....with Fosc/16 (also 4mhz spi)....i get a strange
reading back from the device_ID register (0xE4)....which indicates a dropped bit (lsb)
in that value when read out from the ID register...and other subsequent values from
other registers are not correct
Since spi bus is clocked at same speed (4mhz...in spec of chip which is max 5mhz)....i am
now stuck...dont know how to resolve this
I tried a delay after CS on the device but also no luck
Any ideas?