here is the source code :
thanks for your help and time.
(for PIC18f4520 on MPLAB and Hitech compiler)
again thanks.
Rich (BB code):
#include <pic18.h>
#include <hitech.h>
main()
{
TRISC=0xff;
TRISD=0x00;
while(1)
{
if(RC0==1)
{
RD0 = 1;
RD1 = 0;
RD2 = 1;
}
else
{
RD0 = 0;
RD1 = 1;
RD2 = 0;
}
}
}
(for PIC18f4520 on MPLAB and Hitech compiler)
again thanks.
Last edited: