I2c bus for ds1307 For Basic PRO Compiler

Include "modedefs.bas" @ Device PIC16F877,XT_OSC,WDT_off,PWRT_off,PROTECT_off ,BOD_Off define adc_bits 8 define osc 4 DEFINE LCD_DREG PORTD DEFINE LCD_DBIT 4 DEFINE LCD_RSREG PORTD DEFINE LCD_RSBIT 1 DEFINE LCD_EREG PORTD DEFINE LCD_EBIT 0 S1 VAR PORTA.0 'set mode S2 VAR PORTA.1 'set hour 0-23 S3 VAR PORTA.2 'set minute 0-59 S4 VAR PORTA.3 'set second 0-59 s5 var portA.4 'set day 0-6 s6 var portA.5 'set dat ...

Read more

External interrupt For Basic PRO Compiler

@ device pic16f877 define osc 4 define adc_bits 8 trisb =$0f L1 var portb.6 L2 var portb.7 i var byte on interrupt goto int intcon = %10010000 low L1 low L2 start: toggle L1 pause 500 goto start end disable int: toggle L2 pause 100 intcon.1 = 0 ' Clear flag resume ' Return to main program ' ...

Read more

pulse width moduration(PWM) for lcd 2 line For Basic PRO Compiler

@ device pic16f877 define osc 4 define adc_bits 8 define adc_clock 3 define adc_sampleus 50 Define LCD_DREG PORTD ' Define LCD connections Define LCD_DBIT 4 Define LCD_RSREG PORTD Define LCD_RSBIT 1 Define LCD_EREG PORTD Define LCD_EBIT 0 RW var portd.2 low RW 'LCD R/W low = write trisa = $ff trisd = $00 adcon1 = 0 num var word LCDOUT $FE,1,"lcd_read" pause 3000 while(1) gosub read_value gosub display pause ...

Read more

Analog to dugital 8 bits For Basic PRO Compiler

@ device pic16f877 define osc 4 define adc_bits 8 Define LCD_DREG PORTD ' Define LCD connections Define LCD_DBIT 4 Define LCD_RSREG PORTD Define LCD_RSBIT 1 Define LCD_EREG PORTD Define LCD_EBIT 0 RW var portd.2 low RW 'LCD R/W low = write trisa = $ff trisd = $00 adcon1 = 0 num var byte LCDOUT $FE,1,"lcd_read" pause 3000 main: gosub read_value gosub display pause 200 GoTo main End display: LCDOUT $FE,$80," ...

Read more

Lcd Module Display 2 line For Basic PRO Compiler

@ device pic16f877 define osc 4 define adc_bits 8 Define LCD_DREG PORTD ' Define LCD connections Define LCD_DBIT 4 Define LCD_RSREG PORTD Define LCD_RSBIT 1 Define LCD_EREG PORTD Define LCD_EBIT 0 RW var portd.2 low RW 'LCD R/W low = write trisa = $ff trisd = $00 adcon1 = 7 SW1 VAR PORTA.0 SW2 VAR PORTA.1 num var byte LCDOUT $FE,1,"lcd_read" pause 3000 main: gosub set_value gosub display pause 200 GoTo main ...

Read more

MICROCONTROLLER UART TUTORIAL using pic microcontoller

RS232 EIA232F TTL and USB Adaptor Examples Tx and Rx Baud Rate, Misc Asynchronous Tx Loop-Back Test $50 Robot UART What is the UART? The UART, or Universal Asynchronous Receiver / Transmitter, is a feature of your microcontroller useful for communicating serial data (text, numbers, etc.) to your PC. The device changes incoming parallel information (within the microcontroller/PC) to serial data which can be ...

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

Button Debouncing using PIC16F84 Microcontroller

I apologise for the tardiness of this article; for the next little while, I will probably have to scale them back to once every two weeks or so. The reason is that I am proof reading the "Galley Proofs" of my new book, "PC PhD". This book discusses the PC's hardware and how to develop interfaces (along with the required software) for it. I'll be putting more information about it on my web page as the August ...

Read more

PICMicro Project using PIC16F84 Microcontroller

In the past two weeks, I discussed the prerequisits for starting your first application and the issues surrounding PICMicro programmers and what to look for. With this background, I am now ready to present what I think is a good first application for somebody learning about the PICMicro. This circuit is not as simple as what I started with in "Programming and Customizing the PIC Microcontroller", but can be ...

Read more
Scroll to top