I really appreciate your help guys.
Melanie: ...i know, the code wasn't hot at all, you right, the second PAUSE xxx should be there (i miss that), ... about the PORTA=%00000000 you're forcing it to be an OUTPUT i didn' know...Thank You
Shane: ... i tried to blink it by the internal oscillator and is working, but by the ext crystal (32khz) still doesn'work
Joe: ...i don't think i have to use DEFINE, because i already setup the fuse @ __config _LP_OSC
Please let post first the schematic and the code and after that take a look at my questions (please):
schematic:
code:
@ __config _LP_OSC & _WDT_OFF & _PWRTE_ON & _MCLRE_ON & _BOD_OFF & _IESO_OFF & _FCMEN_OFF & _CP_OFF & _CPD_OFF
'--------------------------------------------------------------------------
CLEAR 'Set all ram registers to zero
'--------------------------------------------------------------------------
'MCU CLOCK SOURCE
OSCCON.0 = 0 'EXTERNAL osc is used for sys clock (SCS bit)
'--------------------------------------------------------------------------
'PORTS CONFIGURATION
ANSEL=0
TRISA = %10000000 'set PORTA.7 (T1OSI=XTAL) to input
TRISB = %00000000
TRISC = %00000000
PORTB=%00000000
PORTC=$00000000
'--------------------------------------------------------------------------
PORTB.6 = 1 'JUST FOR TEST
blink_LED:
PORTA.1 = 1
PAUSE 250
PORTA.1 = 0
PAUSE 250
GOTO blink_LED
Bookmarks