We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I write simple code for toggle PORT2.0 of xc2785 in keil simulator. when i start the simulator,the IO port not toggled. this is my IO port setting. Some thing is wrong in the (Peripheral/IO-ports/port2)in simulator window.In this panel there is DP2 and ODP2 register but in datasheet there is not!!! what is wrong? thanks.
void init_port2() { P2_IOCR00 = 0x80;// Push pull output P2_OUT = 0x0001; // set P2.0 to high while (1) { /* Toggle P2.0 */ P2_OMRL = 0x0101; delay(); } }
Hi Hans. As it seems you read completely simulation documentation.Can guide me how to solve this problem? thanks.