Files
SyncHome/trunk/workspace/gcb/16c84-pwm.gcb
2023-03-09 12:51:54 +00:00

70 lines
2.0 KiB
Plaintext

' ########### start ###########
' pic:PIC16C84
' ########### end ###########
'================================================
'AUTOMATED CODE GENERATED 01-21-2014 10:08:31
'================================================
' Circuit diagram
' ---------------
' +--\/--+
' nc-----|1° 18|-----nc
' nc-----|2 17|--------->PWM_OUT
' nc-----|3 16|<--------H
' +5V--|50K|-->|4 15|<--------H = 4 MHz chrystal+ capacitors
' GND-------->|5 14|<--------+5V
' nc-----|6 13|-----nc
' nc-----|7 12|-----nc
' nc-----|8 11|-----nc
' nc-----|9 10|-----nc
' +------+
'-------------------------------------------------------------
'================================================
'CHIP SETUP AND COFIGURATION BITS
'================================================
#Chip 16C84, 4
#Config OSC = XT, WDT = OFF, PWRTE = ON, CP = OFF
'Configuration bits to be set here for example:
'#Config INTOSC_OSC_NOCLKOUT, MCLRE = OFF
'#Config BOREN = OFF, CP = OFF, DATA = CP_OFF
'#Config PWRTE = OFF, WDT = OFF, LVP = OFF
'Read help and consult the data sheet
'================================================
'DEFINE CONSTANTS
'================================================
'================================================
'DEFINE PORTIO
'================================================
#define PWM_Out1 PORTA.0
'================================================
'DECLARE VARIABLES
'================================================
'dir SoftPWM1 out
'================================================
'INIT INTERRUPTS
'================================================
'================================================
'MAIN PRORAM LOOP
'================================================
Startup:
'Main routine
Loop:
PWMOut 1,128,100
Goto Loop
'================================================
'SUB ROUTINES
'================================================