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 ……………… ……………… }
What do you mean by, "can't write 0xA2 to SPITX?"
You can write everything to SPITX! but i think your "SPICON" is not right!
Thank everybody.I finally found that SPITX register isn't at work in my ADuC7024.
Then How did you solve your problem? the spi is ok now?
I use GPIOs to simulate SPI behavior,and now successfully extend a LCD in ADuC7024
then Tne SPI on ADuC7024 cannot work? why not try again?
I have program examples for SPI. Just send email to support.intl@keil.com and I will provide you with them.
I try SPI for many weeks,and I feel so tired with programming in SPI,finally I throw up the sponge.
You should throw in the towel instead. Throwing up sponges is not recommended.
Did the example that we have provided you not solve the problem?