I tried the following program, very simple, still not getting anything out..
using internal osc, trying to cut down on the hardware...
'Test HPWM command
'
INCLUDE "modedefs.bas" 'Includes supoprt for PicBasic language
@ DEVICE pic16F88, CCPMX_ON, INTRC_OSC_NOCLKOUT
OSCCON = %110 ' Set OSC TO 4MHZ 'select the clock
'DEFINE OSC 20 'use external 20mhz crystal
PAUSE 100 ' start-up delay
'/////////////////////////
'// PIN configuration //
'/////////////////////////
DEFINE CCP1_REG PORTB 'Define output port of pulses out
DEFINE CCP1_BIT 3 'Define output port of pulses out
CMCON = 7 ' Disable analog comparator
TRISB = %00000000 ' Set PORTB to all output
TRISA = %11111111 ' Set PORTA to all input
'///////////////////////////////////////////////
'// Variable Declaration and initialization //
'///////////////////////////////////////////////
'//////////////////////////
'// Program starts here //
'//////////////////////////
HPWM 1,126,3000
PAUSE 200 ' delay
Mainloop:
GOTO Mainloop
end
Bookmarks