Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Tutorial Request: PBP programming + PIC16F877A + VB6 and Proteus simulation.

Status
Not open for further replies.

aljabar

Newbie level 3
Newbie level 3
Joined
Nov 14, 2012
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,296
I need some basic tutorial both of VB6 and PIC16F877A to control vice verse LED and Switch using PBP or ASM (PIC16F877A) in Proteus simulation.
VB_PIC_8051.png

I believe, many member will interest and appreciated for the contribution
 

Hi,

For beginners Assembly look at these tutorials.

**broken link removed**
http://www.winpicprog.co.uk/pic_tutorial.htm
http://www.amqrp.org/elmer160/lessons/

A simple led flasher program is below, just run it though MPLAB to produce the hex file for Proteus.
Code:
;       progam to flash all of PortB pins on and off every 4 seconds, using a 4mhz crystal
;		(2 second flash with  8mhz crystal)


		list p=16f877a
		include p16f877a.inc
		__CONFIG _CP_OFF & _WDT_OFF & _XT_OSC & _PWRTE_ON & _LVP_OFF
	
		cblock 0X20			; specify user regiaters
		d1
		d2
		d3
		COUNT
		endc



		org 	0x000
		GOTO	Main



Main	CLRF	PORTB		; Set portb,c,d to digital outputs
		CLRF   	PORTC
		CLRF 	PORTD
		BANKSEL TRISA
		CLRF	TRISB
		CLRF 	TRISC
		CLRF 	TRISD
		BANKSEL 0

		

LOOP						; main program looP
		CALL	DELAY4s		; call this subrutine
		MOVLW   0xFF
		MOVWF	PORTB		; Set  port HIGH

		CALL	DELAY4s

		MOVLW   0x00
		MOVWF	PORTB		; Set  port LOW
		GOTO	LOOP		


;  SUBROUTINES
	
DELAY4s						; 4 SECOND DELAY
		movlw	0x23
		movwf	d1
		movlw	0xB9
		movwf	d2
		movlw	0x09
		movwf	d3
Delay_0
		decfsz	d1, f
		goto	dly1
		decfsz	d2, f
dly1	goto	dly2
		decfsz	d3, f
dly2	goto	Delay_0
	

		return
 

Attachments

  • 000083.jpg
    000083.jpg
    31.3 KB · Views: 93

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top