Thursday 27 June 2019

atmega - SPI device prevents ISP programming


I have an ATmega8 with a Nokia LCD 5510 connected to it. Everything works great on a breadboard and my next step is to move it to a more permanent board. My problem is that I can't program the ATmega8 while the LCD is also connected. I assume it's because they use the same SPI pins and that the LCD somehow interferes with the programming. How can I do this different so that I can flash the ATmega via ISP without unplugging the LCD?



Answer



You have to prevent any other device from driving the SPI lines during programming.


To avoid driver contention, a series resistor should be placed on each of the three dedicated lines if there is a possibility that external circuitry could be driving these lines.


enter image description here


Take a look at Application note AVR910.




To avoid problems, the In-System Programmer should be able to keep the entire Target System Reset for the duration of the programming cycle. The target system should never attempt to drive the three SPI lines while Reset is active.



So it would be best if the reset lines of the ATMEGA and the display are functionally connected to prevent the display from doing anything while the programmer holds reset.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...