copying port data from one to another

Status
Not open for further replies.

Varunme

Member
The below code for copying data from one port to another not working in proteus , what can be the reason ?

void main()
{

trisd=0;
trisc=0xff;

portd=portc;

}
 
Nice, easy fix.

Also, depending on which chip you are using, you should set the Latch resgisters instead of the port registers.

LATD = PORTC;
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…