Now I want to use SPI of ADuC7024 to extend a LCD.But I fail to write any data to SPITX which is SPI's transmitting register.Who could help me?Thank you! There is the beginning code. int main(void) { GP1CON = 0x02220000; SPICON = 0x1B0F; SPIDIV = 0x0F; SPITX = 0xA2; // can't write 0xA2 to // SPITX ……………… ……………… }
Did the example that we have provided you not solve the problem?
You should throw in the towel instead. Throwing up sponges is not recommended.
I try SPI for many weeks,and I feel so tired with programming in SPI,finally I throw up the sponge.
I have program examples for SPI. Just send email to support.intl@keil.com and I will provide you with them.
then Tne SPI on ADuC7024 cannot work? why not try again?
I use GPIOs to simulate SPI behavior,and now successfully extend a LCD in ADuC7024
Then How did you solve your problem? the spi is ok now?
Thank everybody.I finally found that SPITX register isn't at work in my ADuC7024.
You can write everything to SPITX! but i think your "SPICON" is not right!
What do you mean by, "can't write 0xA2 to SPITX?"
try SPICON = 0x174F
I thought your SPICON configure is not right. you should not enable loop back!
View all questions in Keil forum