PIC16F877A based battery level indicator. Proteus simulation with MikroC for PIC coding. Tutorial.
Guys, My lectures are free for everyone. If you want to support my channel, then become a Youtube member by following link below: https://www.youtube.com/channel/UCpdIWTTY36Dhyb20V4EnMiA/join Seek knowledge from the cradle to the grave /// /////////////////////////////////////////////////////**********************************///////////////////////////////// Hello guys, Welcome to Learning Microcontrollers youtube Channel, Guys I have also compiled course on Udemy as well. Where you will learn under my direct supervision in a more supervised way. Here is the links to the courses I have on Udemy, By taking any of these courses you will be supporting my channel aswell. This will help me to make more videos with better hardware in the future. I hope you look forward to it. Courses Links: 1- https://www.udemy.com/course/pic16f877a-interface-lm35-temp-sensor-mikroc-collection 2- https://www.udemy.com/course/mikroc-for-pic-libraries-with-examples-using-pic16f877a-mcu 3- https://www.udemy.com/course/mikroc-for-pic-libraries-with-examples-using-pic16f877a-mcu 4- https://www.udemy.com/course/pic-microcontroller-using-mikroc-for-pic-from-scratch 5- https://www.udemy.com/course/learn-arduino-uno-coding-using-arduino-ide ///////////////////////////////////////////////////// Hello guys, Calculating the voltage of a battery is a very important thing in any project. This is one of the way to do that. NOTE: Youtube description dont allow using greater than and less than mathematical symbols. For that GT = Greater than LT = Lesser than After you copy paste this code simply change them as shown in video. MikroC for PIC programming from video: float data1; void main() { ADC_Init(); Delay_ms(50); PORTB = 0x00; TRISB = 0x00; PORTB = 0x00; Delay_ms(50); while(1) { data1 = ADC_Read(0); Delay_ms(50); if (( data1 GT 0 ) && ( data1 LT 137 )) { PORTB = 0b00000001; } else if (( data1 GT 137 ) && ( data1 LT 274 )) { PORTB = 0b00000010; } else if (( data1 GT 274 ) && ( data1 LT 411 )) { PORTB = 0b00000100; } else if (( data1 GT 411 ) && ( data1 LT 548 )) { PORTB = 0b00001000; } else if (( data1 GT 548 ) && ( data1 LT 685 )) { PORTB = 0b00010000; } else if ( data1GT 685 ) { PORTB = 0b00100000; } else { PORTB = 0b00000000; } } }
Download
0 formatsNo download links available.