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 = 0x01
↧