Matrix scankey 3×4 for Lcd 2 line For CSS Compiler

#include <16F877.h> #device adc=8 #FUSES NOWDT ,XT #use delay(clock=4000000) char const s[10]={'0','1','2','3','4','5','6','7','8','9'}; void init_mcu (void); void display (void); void display1 (void); void calculate (void); void hex_bcd2(int8 k); /*-------define keypad------------*/ #define row0 pin_b0 // input #define row1 pin_b1 // input #define row2 pin_b2 // input #define row3 pin_b3 // input #de ...

Read more

PIC12F675 Tutorial 6 : Driving a standard servo motor with a PIC

Servo motor driver tutorial. This tutorial uses the 12F675 microcontroller to drive a servo. The microcontroller generates the signals to control a standard servo using Timer 0 interrupts (I used a Futaba servo).  It does not do anything clever just sets the servo position to predefined positions at one second intervals. A Timer 0 interrupt creates the 20ms timebase for servo updates using the internal cloc ...

Read more

How to interface RFID with PIC18F4550 Microcontroller

RFID (Radio Frequency Identification and Detection) is widely used everywhere from highly secured defense laboratories to school attendance system. By employing RFID, much secured entry systems can be developed without incurring huge costs. These are the reasons of excessive use of RFID technology. In this article, interfacing of an RFID reader module has been explained with PIC18F4550. The USART interrupt, ...

Read more

One wire bus (DS1820) Control For CSS Compiler

#include <16F877A.h> #device adc=8 #FUSES NOWDT,XT //No Watch Dog Timer #use delay(clock=4000000) #include <Shift_595_C.c> // 25.5 C 0.5 to step #include <read_temp.c> void main(){ setup_adc_ports(NO_ANALOGS); setup_adc(ADC_OFF); set_tris_a(0xff); set_tris_b(0x00); value = 0; display(); delay_ms(100); while(true){ read_ds1820(); value = temp; hex_bcd(value*10); sent_data(); delay_ms(100); ...

Read more

LightKit: Pic Spoon Feed Model Railroad Lighting with Pic 12F683 12F690 and Pickit2 Video Tutorial Series

In this video series I am walking through step by step setting up from scratch to build a model railroad structure and layout lighting system that includes using the Pickit2, MPLAB and HI-Tech C. This is a complete walk through! Part 1 - http://youtu.be/DJlT0ZIQiO8 Installing MPLab and Hi-TechC / Obtaining a Pickit Programmer Part 2 - http://youtu.be/IR2s0dn-dQU General Pic information / Bread boards / Prot ...

Read more

Introduction To The PIC Microcontroller Talk video tutorial

In this talk, you are introduced to how to get started using the PIC Micro. The talk includes practical tips and ideas. In addition, the link to download all the material is here: 4shared.com/folder/2FPmwzlu/_online.html This includes beginner documentation, demo software, and additional material, like how to modify the PICKit-2 and what you'll need to get started. The key to getting started is, KEEP IT SIM ...

Read more

External interrupt For CSS Compiler

#include <16F877.h> #device adc=8 #fuses XT,NOWDT,NOPROTECT,NOLVP #use delay(clock=4000000) #INT_EXT void EXT_ISR(void){ output_toggle(PIN_B7); delay_us(300); } void Init_MCU(void){ enable_interrupts(GLOBAL); enable_interrupts(INT_EXT); ext_int_edge(H_TO_L); set_tris_B(0x01); output_low(pin_B7); } void main(){ Init_MCU(); while (TRUE) { output_toggle(PIN_B6); delay_ms(1000); } }   ...

Read more

Basic input-output For CSS Compiler

#include <16F877.h> #device adc=8 #FUSES NOWDT ,XT #use delay(clock=4000000) void main() { set_tris_a(0xff); set_tris_b(0x00); setup_adc_ports(NO_ANALOGS); setup_adc(ADC_OFF); output_b(0x00); while(true){ if(!input(pin_a0)){ output_b(0xff); delay_ms(100);} if(!input(pin_a1)){ output_b(0x00); delay_ms(100);} } } ...

Read more

The Theory of PIC Programming

Frustration! Have  you ever experienced frustration when you didn’t have a PIC programmer handy?  Your programmer breaks or you loaned it out to your buddy and you sit just twiddling your thumbs.  It left you feeling powerless because you couldn’t test that great idea, didn’t it?   If so, you share experiences similar to mine.  It is annoying at the very least and does not help creativity.  Or maybe it does ...

Read more
Scroll to top