Verifying whether SPI is working for Linear Tech LTC6802

m4v3r1k

1 µW
Joined
Mar 9, 2011
Messages
2
Hi I am doing my final year project on battery management system using the LTC6802-1 and Silicon lab's MCU C8051F340.


I tried to test out the SPI data connection between the chip and MCU but all I obtained was 0xFF when i tried to read the config data RDCFG.


I am using a 12V lead acid cell with voltage dividers to simulate 4 cells of around 3V each to power the chip. Is there anything additional that I have to connect in order to test out if the SPI link is working?


I have attached my circuit for the LTC6802 below
296lw79.jpg



Thanks
Benson
 
Reading back all 0xFF indicates that the MISO pin on your MCU probably was pulled high the entire time. There are several things to check:

1) Make sure your MCU doesn't requore pull-up or pull-down resistors on its MOSI/MISO pins or it's SPI clock pins. This is uncommon but can happen. If they are necessary they're probably a 10k resistor to +VCC or GND.

2) Connect your MCU to some other SPI device, like an LCD or an EEPROM. This will make sure your particular MCU is good and your SPI code is working right.

3) Make sure your serial clock isn't too fast. I don't know what your MCU or the LTC's clock limits are but if you send a 1MHz SPI signal to a chip that can only work at 250kHz then you won't have good results.

Cheers,
--Adam
 
Thanks adam,

I have verified that my MCU is working using an oscilloscope, and is using a 10k Hz clock for my SPI transfer.

The output of the LTC chip is open drain in nature, and I have added the 10k pullup resistor accordingly.

However, I am still seeing 0xFF when I tried to tried to read for the config. Is there any other problems that I have to consider?

Regards
Benson
 
Back
Top