Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC programming question

Status
Not open for further replies.

Deni

New Member
Hi all, I'm glad to join this forum and hope to get/give some usefull information here!

I have a question about a program, I've wrote for the PIC 16f84
I wantet some leds, connected to all the port B I/O ports to flash from both ends, to the middle and back again. I tried to solve it like this:

Start movlw b'10000001'
movwf PORTB
call DELAY
movlw b'01000010'
movwf PORTB
call DELAY
movlw b'00100100'
movwf PORTB
call DELAY
movlw b'00011000'
movwf PORTB
call DELAY
movlw b'00100100'
movwf PORTB
call DELAY
movlw b'01000010'
movwf PORTB
call DELAY
movlw b'10000001'
movwf PORTB
call DELAY
goto Start

But when I plug the PIC in the circuit, it only does

movlw b'10000001'
movwf PORTB
call DELAY
movlw b'01000010'
movwf PORTB
call DELAY
movlw b'00100100'

and then it starts over! What could the reason for this be?

Thanks for answering, all answers will be appreciated
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top