Mr. Banyat Somsupan ubonTecnical Unit 2
Electronic Ubontecnical
2 2. next
Electronic Ubontecnical 3 4
Electronic Ubontecnical 5
6 Next
Electronic Ubontecnical 7
8 9
10
Electronic Ubontecnical 11 12
Electronic Ubontecnical 13 14
Electronic Ubontecnical 15
Electronic Ubontecnical 2 New Project
Electronic Ubontecnical 3 Next
Electronic Ubontecnical 4 5 Folder 6 Drive C 7 Make New Folder
Electronic Ubontecnical 8 9 OK 10 Pic 11 Crystall 12 Next
Electronic Ubontecnical 13 Next
Electronic Ubontecnical 14
Electronic Ubontecnical 15 Finish
Electronic Ubontecnical Code C
Electronic Ubontecnical 1 Code 2 Build.hex 3 Successfully
void main(void) { TRISB =0; // make Port B an output While ( 1 ) // repeat forever like while(ture) { PORTB = 0x55; delay_ms(1000); PORTB = 0xAA; delay_ms(1000); } Write a MikroC for Pic program to toggle all the bits of port B Electronic Ubontecnical
void main(void) { unsigned char z; TRISB =0; // make Port B an output while (1); // needed If running in hardware { for (z=0;z<=255;z++) PORTB =Z; delay_ms(500); } Write a MikroC program to send values 00-FF to port B Electronic Ubontecnical
Mr. Banyat Sosupan Electronic Ubontecnical