signalmo
Newbie level 3
- Joined
- Nov 6, 2010
- Messages
- 4
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Location
- United States of America
- Activity points
- 1,317
My pic wont' oscillate at all. I believe its the config settings, because It ran good with a test file(.HEX) that I grabbed from this form. It would be nice if we had a small little program for absolute beginners. I have attached the assembly code, the p18f4550.INC file and the pics of the oscillator.Any kind of help will be appreciated.
Oscillator type : 10 MH
Caps: 22 pico farads
LIST P=18F4550
#include "P18F4550.INC"
Here is my Assembly code. All I'm trying to do is turn on and of two led's.
Thanks for your time and effort.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CONFIG FOSC= XTPLL_XT
CONFIG WDT=OFF;
CONFIG MCLRE=ON;
CONFIG DEBUG=ON;
CONFIG LVP=OFF;
ORG 0X0000;
Delay1 equ 0XFF
Delay2 equ 0XFF
Start:
CLRF PORTD
CLRF TRISD
; CLRF Delay1
; CLRF Delay2
MainLoop:
clrf TRISD
clrf PORTD
movlw B'11111111'
movwf PORTD
clrf TRISB
clrf PORTB
movlw B'11111111'
movwf PORTB
GOTO Delay
GOTO Delay
; here we turn off the leds
movlw B'00000000'
movwf PORTD
movlw B'00000000'
movwf PORTB
GOTO Delay
GOTO Delay
GOTO Start
Delay:
DECFSZ Delay1,1
GOTO Delay
end
Oscillator type : 10 MH
Caps: 22 pico farads
LIST P=18F4550
#include "P18F4550.INC"
Here is my Assembly code. All I'm trying to do is turn on and of two led's.
Thanks for your time and effort.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CONFIG FOSC= XTPLL_XT
CONFIG WDT=OFF;
CONFIG MCLRE=ON;
CONFIG DEBUG=ON;
CONFIG LVP=OFF;
ORG 0X0000;
Delay1 equ 0XFF
Delay2 equ 0XFF
Start:
CLRF PORTD
CLRF TRISD
; CLRF Delay1
; CLRF Delay2
MainLoop:
clrf TRISD
clrf PORTD
movlw B'11111111'
movwf PORTD
clrf TRISB
clrf PORTB
movlw B'11111111'
movwf PORTB
GOTO Delay
GOTO Delay
; here we turn off the leds
movlw B'00000000'
movwf PORTD
movlw B'00000000'
movwf PORTB
GOTO Delay
GOTO Delay
GOTO Start
Delay:
DECFSZ Delay1,1
GOTO Delay
end