1) Program design - Assignment hand-out 2) Microchip PICs and MPLAB 3) Input and Output Digital and serial I/O 4) Debugging using MPLAB simulator 5) Lab session 6) Analogue input 7) Interrupt programming external and timers 8) Simulator - stimulus and DCMI 9) Test 2 Assignment hand-in
1
int inpPortA; void main (void) { TRISB = 0; // configure port B for output TRISA = 0xFF; // configure port A for input while (1) { inpPortA = PORTA; // read port A PORTB = inpPortA; // output to port B } }
5
// Set PortB bit 2 (RB2) as output. // clear port B bit 2 // use definition