Tutorials

Programming Eight Program Memory Words at a Time

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

The Theory of PIC Programming Read More »

PIC16 Microcontrollers Video Tutorial Series

PIC16 Microcontrollers Video Tutorial Series

Lecture on “Intro to Microprocessors” using Wilmshurst’s “Designing Embedded Systems with PIC Microcontrollers” Chapter 1, sections 1-3 Topics: What is an Embedded system?, Embedded examples, CISC vs. RISC, Memory: Volitile vs. non-volitile, Memory Organization: Von Neumann vs. Harvard Chapter 1, sections 4-6 Topics: Microcontrollers vs. Microprocessors, Microcontroller families, Microchip Inc. History and background, Table of

PIC16 Microcontrollers Video Tutorial Series Read More »

7 segment display

Counting on the 7-segment display

This experiment uses the push-button to increment the count on the 7-segment display. The count-value is stored in a file and this value is incremented by the program each time the push button is pressed. The count-value is used to look-up a table to pick up the display-value for the 7-segment display. Additional experiments on the website

Counting on the 7-segment display Read More »

Seven segment display 4 digit For CSS Compiler

#include <16F877.h> #device adc=8 #fuses NOWDT,HS, NOPUT, NOPROTECT, BROWNOUT, NOLVP, NOCPD, NOWRT, NODEBUG #use delay(clock=4000000) #define sw_up pin_a0 // SWITCH UP #define sw_down pin_a1 // SWITCH DOWN INT16 COUNT; int8 A,B,C,D; //int8 segment[10] ={ 0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};//common anode int8 num[10] ={ 0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x27,0x7F,0x6F};//common cathode 0 1 2 3 4 5 6 7 8 9 // 0 1 2

Seven segment display 4 digit For CSS Compiler Read More »

Stepping Motor Control For CSS Compiler

#include <16F877.h> #fuses XT,NOLVP,NOWDT,NOPROTECT #use delay(clock = 4000000) #use fast_io(A) #use fast_io(B) byte num[5] = {0x00,0x01,0x02,0x04,0x08}; int8 disp,i; void Forward(){ for(i=0; i<=4;i++){ disp =num[i]; output_b(disp); delay_ms(200); } } void Backward(){ for(i=4;i>0;i–){ disp =num[i]; output_b(disp); delay_ms(200); } } void Stop(){ disp =0; output_b(disp); delay_ms(50); } void main(){ setup_adc(adc_off); set_tris_a(0xFF); set_tris_b(0B00000000); stop(); while(true){ if(!input(pin_a0)){ do{ Forward(); }

Stepping Motor Control For CSS Compiler Read More »