Contents
What are the features of the pic12f683 programming circuit?
Fig. 2 Features and pin connections of the PIC12F683. Fig. 2 shows just some of the features of the PIC12F683 which includes 6 programmable I/O pins, 4-channel analog-to-digital converters, and 1 each PWM and comparator modules. It has far more features than a PIC16F84A and has ADCs the PIC16F628 lacks.
Which is the status register in pic12f683?
The STATUS register (0x03 and 0x83) is shared by BOTH Bank0 and Bank1 respectively. Bit 5 (labeled RP0) is the bank select bit. Clearing the bit (0) puts one in bank 0 and setting the bit (1) puts one in bank 1: BSF is “bit-set file” while BCF is “bit clear file”.
What does Org 0x004 mean in pic12f683?
ORG 0x004 is the interrupt vector pointing to what is known as an ISR or interrupt service routine. The PIC12F683 has a number of programmable hardware interrupts. Once an interrupt occurs the PIC stops what it’s doing, saves the present location-count address on the STACK, then services the ISR.
How is a potentiometer connected to a pic12f683?
A potentiometer is connected to GP0 programmed as an analog input using the 10-bit ADC module. This 10-bit value is read and used to set the duty cycle for the 10-bit PWM module at GP2. Think of the PIC12F683 or any other PIC as a collection of programmable electronic modules along with the micro-controller.
How to write input pin to output pin?
Writing 1 (High) to a single bit of the TRISx register configures the pin corresponding to this bit to be an input pin. Writing 0 (Low) to a single bit of the TRISx register configures the pin corresponding to this bit to be an output pin.
How to control the I / O port on a PIC?
Controlling or driving the I/O port is a pretty easy process. It involves only two consecutive steps. Configure The Pin, determine the data direction, whether it’s an Input or Output Read / Write. If the pin is configured to be an input pin, then you’ll be reading (polling) its state several times within your program.
How is the opto-coupler connected to the Pic?
The opto-coupler isolates the 12-volt circuit from the 5-volt PIC. A potentiometer is connected to GP0 programmed as an analog input using the 10-bit ADC module. This 10-bit value is read and used to set the duty cycle for the 10-bit PWM module at GP2.