Hi,
This ( as ARatti finished it ) :
Code:
'****************************************************************
'* Name : BPWZ.BAS *
'* Author : [select VIEW...EDITOR OPTIONS] *
'* Notice : Copyright (c) 2010 [select VIEW...EDITOR OPTIONS] *
'* : All Rights Reserved *
'* Date : 08/04/2010 *
'* Version : 1.0 *
'* Notes : 16F819 *
'* : *
'****************************************************************
DEFINE OSC 8 ' 8 Mhz Oscillation
OSCCON = $70 ' Oscilator Config reg.
ADCON1 = 7
TRISA = %00000000
TRISB = %00000000
PortA = 0
PortB = 0
start:
High 0
pause 1000
low 0
pause 1000
goto start
Makes PortB.0 blink @ 2 Hz ... Only if you use an external 8 Mhz Xtal ... as PBP Defaults to HS Osc for the Config. ( see #14 from Dave )
you must add :
Code:
@ device PIC16F819,INTRC_OSC_NOCLKOUT, WDT_ON, PWRT_ON, MCLR_ON, protect_OFF, LVP_OFF
to the top of the listing to get INTRC Oscillator work, if MCS using. Then no need to define the options by hand in IC Prog ...
a look to manual $ 4.11 will show how "numbers only" work as port pins defining ...
is the great mysterious code problem solved, now ???
Alain
Bookmarks