They control the hardware and other functions. The p12f Look at this code that will setup the internal clock in the template. Use lots of comments to make notes to yourself!
|Published (Last):||13 May 2007|
|PDF File Size:||17.61 Mb|
|ePub File Size:||12.16 Mb|
|Price:||Free* [*Free Regsitration Required]|
Tested Introduction Electronics is my hobby. I picked PIC12F microchip. So I thought of making my own learning board for this. In this project, I am first going to describe the learning board that I made, and then will demonstrate few experiments on it. A DC motor with a transistor driver. A piezo-buzzer Most of these features on the board are accessible through female header pins. Only the ISCP pins are accessible through male header pins.
The entire circuit is built on a 8 x 12 cm general prototyping board. The piezo buzzer is also driven directly by a PIC pin through a series resistor. The DC motor, however, is connected as a load to the collector of S transistor as the required current to drive the motor cannot be supplied by the PIC port. So, the PIC port can switch on the transistor by pulling its base HIGH and the collector current of the transistor provides the sufficient current to drive the motor.
The TTL to RS level converter and vice-versa is achieved with two transistors and few other components. The transmitter and receiver port on microcontroller side are denoted by uTx and uRx, whereas on the PC side are denoted by Tx and Rx, respectively. The circuit diagram shows that the two input tact switches with the two potentiometer outputs and all the eight PIC12F pins are accessible through female headers.
The tact switches are active low, i. There are couple of extra headers for Vcc and Gnd terminals which may be required while doing experiments. Make sure that the sequence of ISCP pins on the programmer side and our learning board match. But for the experiments that I am going to demonstrate here, I am using the free version of mikroC compiler from MikroElektronica.
We will use the following configuration bits for PIC12F In mikroC, you can select these in Edit Project window. Experiment No. After it gets to , it resets to and starts counting again. The count value will be displayed on three LEDs. The objective of this experiment is to control a motor with two tactile switches. Also connect the motor drive pin to GP2 pin 5. The string will be transferred to PC and displayed on a Hyperterminal window when SW1 switch is pressed. Also, define a new connection hyperterminal window on a PC with the following settings.
The objective of this experiment is read an analog voltage from a potentiometer, convert it to bit digital number, and serially transfer it to a PC. The digital number will be displayed on a hyper terminal window.
You can vary the potentiometer and the digital equivalent number will also change. Remember, the ADC is bit so the number you see on the screen will be from to
Introduction PIC12F683 Programming Circuits Tutorial
Learning Board for Microchip PIC12F683 microcontroller