555 Timer Astable mode, Lt spice simulation, and real-time testing We know 555 timer has three operating modes called Astable mode, Monostable mode, and Bistable mode. Astable Mode : In Astable mode, 555 IC will act as an oscillator that generates a square wave continuously . The frequency of the wave can be adjusted by changing the values of two resistors and a capacitor connected to the chip. LTspice circuit: Formulas: Calculations: Ton = 0.693(1k+100k)22uF =1.539ms Toff =0.693*100k*22uF =1.524ms T = Ton + Toff = 0.693(1K+2*100k)22ufF=3.064ms Frequency = 1/T = 1.44/(1k+2*100k)22uF = 1/3.06ms =0.3263Hz Duty = 50.2% Simulation Results: Click here to download the Astable mode LTspice circuit Testing:
PIC12F675 LED Blinking Code This post provides the code to make an LED blink using PIC12F675 microcontroller. This code is written in C language using MPLAB X IDE with XC8 compiler. This code is intended to be the first step in learning how to use PIC12F675 microcontroller in your projects. Code: // PIC12F675 Configuration Bit Settings // 'C' source line config statements #include <xc.h> /*define clock freq*/ #ifndef _XTAL_FREQ #define _XTAL_FREQ 4000000 // 4MHZ crystal #endif // #pragma config statements should precede project file includes. // Use project enums instead of #define for ON and OFF. // CONFIG #pragma config FOSC = INTRCIO // Oscillator Selection bits (INTOSC oscillator: I/O function on GP4/OSC2/CLKOUT pin, I/O function on GP5/OSC1/CLKIN) #pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT disabled) #pragma config PWRTE = OFF // Power-Up Timer Enable bit (PWRT disabl...
I2C Communication: This post rewind the I2C Hardware overview, I2C Pullup resistor value calculation, and LT Spice simulation. Hardware Overview: The I2C bus is a very popular and simple bus used for communication between a master or multiple masters and single or multiple slave devices. This communication only uses two-wire SDA and SCL. Which is a serial data line and serial clock line. Both SCL and SDA lines are open-drain or open-collector configurations. This means it needs an external pullup resistor is completely taking control of generating the logic high signal. I2C uses an 8-bit data structure which is a common data format for most Microcontroller and Microprocessor In the 8 bit communication, 7 bits are address bits and the last bit represents the Read/Write operation (1=Read Write =0) I2C Protocol is address-based, meaning that all the slave IC must have a unique address, this address is configured through hardware pins to logic "1" or "0". Some slaves...
Comments
Post a Comment