can any help me with this? to convert a pseudocode into c program code?
{
set port C and port D to input(appropriate TRIS registers)
loop until port D pin 0 goes high
read port C pin0-pin3
perform look-up for the corresponding value
}
The pseudocode is words representing the actual programming keywords. Pseudocode tells you what the program needs to do. In this case, it is the stuff between the "{" and the "}".
can any help me with this? to convert a pseudocode into c program code?
{
set port C and port D to input(appropriate TRIS registers)
loop until port D pin 0 goes high
read port C pin0-pin3
perform look-up for the corresponding value
}
char kp =0;void main(){
TRISC =0xFF;
TRISD =0xFF;while(1){while(RD0_bit ==0);
kp =(PORTC &0x0F);switch(kp){case0://do what you want herebreak;case1://do what you want herebreak;case2://do what you want herebreak;//...default:};}}
So this is the coded for
{
set port C and port D to input(appropriate TRIS registers)
loop until port D pin 0 goes high
read port C pin0-pin3
perform look-up for the corresponding value
}
char kp =0;void main(){
TRISC =0xFF;
TRISD =0xFF;while(1){while(RD0_bit ==0);
kp =(PORTC &0x0F);switch(kp){case0://do what you want herebreak;case1://do what you want herebreak;case2://do what you want herebreak;//...default:};}}