I have two questions about the SPI bus
let's say i have the SCK pin on the mage128 set as an output.. and let's say it's doing it's thing.. clocking other devices on the SPI.. now.. remember it's an output.. let's say.. while it's doing it's thing.. i decide to reprogram to try out some new code.. i plug the programmer into the ISP header, and process to program.. while the AVR is runing some code and working the SPI bus..
the SCK pin is used by the programmer to program the AVR.. so.. what happens? wouldn't there be a collision?? the AVR is trying to clock stuff on the SPI bus (just doing its thing).. but the programmer wants to program.. so basically.. i'm connect two outputs together... :shock:
so... yeah... what do you do here??
so.. say i have a device on the SPI bus (that is.. the Mega128 as master, and the other device as slave).. when i wnat to program using ISP.. the SCK that is going to program the Mega128 is also clocking the other device on the SPI bus.. is that a problem?? and then when it's done programming the mega 128 changes it's SCK pin from an input to an output to start clocking the otehr device on the ISP bus...
is this a problem?? As long as I reconfigure the device everytime i run my AVR code.. it shoudl be okay right?? or do you guys recommened i do something in hardware...