morelius21 0 Posted April 14, 2015 Share Posted April 14, 2015 Hi, i try to make a simple program in C to control a lcd. I need to make two "nop" in one function but i don't know the syntax . Always, the compiler make a assembler error and i can't run the program. function: void Toggle_A_Lcd(void){ LcdControl |= En; asm (nop); asm (nop); LcdControl &=~ En; } somebody could tell me how make this, please? thanks Quote Link to post Share on other sites
dubnet 238 Posted April 14, 2015 Share Posted April 14, 2015 You could use the C delay function or just a loop. Here is a link to some information on the C delay function: http://www.programmingsimplified.com/c/dos.h/delay Hope this helps. morelius21 1 Quote Link to post Share on other sites
mgh 11 Posted April 14, 2015 Share Posted April 14, 2015 This link might help: https://e2e.ti.com/support/development_tools/compiler/f/343/t/56276 Short answer: asm(" nop"); morelius21 1 Quote Link to post Share on other sites
Atas 5 Posted April 14, 2015 Share Posted April 14, 2015 _nop(); morelius21 1 Quote Link to post Share on other sites
morelius21 0 Posted April 15, 2015 Author Share Posted April 15, 2015 Hi people thanks for the information, I try today to test all. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.