Month: July 2023
-
How to use Bluetooth LE of Raspberry Pi Pico W using MicroPython
Step 1: Download the MicroPython UF2 file from the link below https://www.raspberrypi.com/documentation/microcontrollers/micropython.html Download the UF2 file which has Wi-Fi and Bluetooth LE support. Step 2: Put the UF2 file in your raspberry pi pico w Step 3: Save the following files in your raspberry pi pico w As you can see in the image, these…
-
How to use MG90S Servo Motor with Raspberry Pi Pico using micropython
I have this MG90S small servo motor. It is supposed to go from 0° to 180°. Because of their low cost, they have a short range which is less than 180°. Some go to 135°, 100° or 150°. PWM signal required by servo to move. Frequency = 50HzTime Period = 0.02 Second or 20 mili…
-
How to use UART and Interrupts of PIC16F877A
The PIC16F877A has a single ISR function which is called every time some things generate an interrupt. Inside the ISR you have to check for individual flag bits to know which peripheral has generated that interrupt.
-
Interface LCD 16×2 Character in 4-Bit Mode with PIC16F877A
To save the number of pins of the microcontroller we interface the character LCD in 4-bit mode. If we take a look at the PINS of the character LCD [ VSS | VDD | V0 | R/S | R/W | E | D0 | D1 | D2 | D3 | D4 | D5 | D6…
-
How to Control the GPIO of PIC16F877A using MPLAB X IDE
The PIC16F877A microcontroller is a popular choice for embedded systems development due to its versatility and ease of use. One of the essential aspects of working with microcontrollers is controlling General Purpose Input/Output (GPIO) pins. In this blog post, we will explore how to control the GPIO pins of the PIC16F877A using MPLAB X IDE,…
-
ATmega328PB 16-bit Timer TC3 – Fast PWM Mode
I have used this FAST PWM mode to trigger two interrupt service routines. The timer compares register A sets the frequency. I have not enabled the output compare pins. since it was used by some other peripheral. So by doing this, I generate a PWM signal by issuing a command in the ISR.
-
ATmega328PB 16-bit Timer TC1 – CTC Mode
Timers are essential components in microcontrollers that allow precise timing and synchronization for various applications. The ATmega328PB microcontroller offers several timer/counters, including Timer/Counter 1 (TC1), which is a 16-bit timer with advanced features. In this blog post, I will explore how to utilize Timer 1 in CTC (Clear Timer on Compare Match) mode on the…
-
ATmega328PB 8-Bit Timer TC0 – Normal Mode
The simplest mode of operation is the Normal mode (WGM0[2:0] = 0x0). In this mode, the counting direction is always up (incrementing), and no counter clear is performed. The counter simply overruns when it passes its maximum 8-bit value (TOP=0xFF) and then restarts from the bottom (0x00). In Normal mode operation, the Timer/Counter Overflow flag…
-
AVR timer overflow calculator
Main Clock Frequency (F_CPU): Timer Resolution(8bit or 16bit): Timer Counter Value: Timer Clock Prescaler: 1 8 64 256 1024 Timer Step Period: seconds Overflow Period: seconds Calculate Value Clear Values Code for Calculations
-
Raspberry Pi Model 3b+ Custom Case with Camera Mounting
I made this enclosure using the MDF sheet. It has all the port openings that raspberry pi has. I made an attachment on the side to mount the camera.
