PIC16F877 and UART mikroC example
In this example we will show a basic example of reading and writing text to the UART (serial) using a PIC. We will use this in later examples when we look at sensors and we will output via a serial…
In this example we will show a basic example of reading and writing text to the UART (serial) using a PIC. We will use this in later examples when we look at sensors and we will output via a serial…
In this example we are using a PIC16F877 to generate a PWM signal, this particular chip has 2 Capture/Compare/PWM Peripherals The following MikroC Pro for Pic functions will be used PWMx_Init Initializes the PWM module with duty ratio 0. Parameter…
This is an example that shows how to use UART module of PIC16F877 microcontroller using mikroC compiler. In this case we use the mikroC Pro for PIC UART library. Pins RC6 and RC7 are used for the UART (serial) communication…
In this example we will show you how to connect a 7 segment display to our PIC16F877. You can think of a 7 segment display as 7 individual LEDs in a configuration like the picture below. Image 1 shows the…
In this example we interface an AD keypad to our PIC16F877 and we also connect an LCD display. The LCD display is simply as a debug tool to display A/D readings, the nature of an AD keypad is that there…
Sometimes in your projects you simply do not have enough I/O lines available, take for example a lot of the multiple LED examples, these use 8 outputs to control 8 LEDs via your PIC, that can restrict the amount of…
In this example we connect the ever popular DS18B20 temperature sensor to our PIC, we will then display the temperature on our LCD We used the DS18S20 in our example this was connected to PORT E pin 2 of our…
In this example we will read the temperature and humidity using a DHT11 sensor and display the readings on our LCD. We have linked to the datasheet at the bottom of the page, download it and then you can read…
In this example we will connect an LDR again but this time when the ADC value goes below a certain number we will switch an LED on, in real life this could be an alarm or a night light. The…
In this example we connect an LDR to ADC channel 2 which is PA 2. Once again you will get a value in theory between 0 and 1023. The more light that there is the higher the value. We will…
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Read More