Hi! avery body:
My problem is that the following program give the errors listed down, Tanks you.
#chip 16F628, 4
#config CP_OFF, DATA_CP_OFF, PWRTE_OFF, WDT_OFF, LVP_OFF, MCLRE_OFF, INTRC_OSC_NOCLKOUT
dir porta.0 in
dir portb b.3 out
dim ar as byte
do
ar = ReadAD(an0)
HPWM 1, 2, ar ' HPWM chanel, frecuency in KHz, working cycle
wait 5 ms
loop
a-d.h (178): Error: Missing bit in SET command
a-d.h (179): Error: Missing bit in SET command
a-d.h (180): Error: Missing bit in SET command
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The 16F628 doesn't have an A/D converter in it, so ReadAD won't work. You need to use the Pot command (http://gcbasic.sourceforge.net/help/pot.htm), or upgrade to a 16F819, 16F88, or some other chip with an A/D module.
Also, you have a typo - replace "dir portb b.3 out" with "dir portb.3 out".
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi! avery body:
My problem is that the following program give the errors listed down, Tanks you.
#chip 16F628, 4
#config CP_OFF, DATA_CP_OFF, PWRTE_OFF, WDT_OFF, LVP_OFF, MCLRE_OFF, INTRC_OSC_NOCLKOUT
dir porta.0 in
dir portb b.3 out
dim ar as byte
do
ar = ReadAD(an0)
HPWM 1, 2, ar ' HPWM chanel, frecuency in KHz, working cycle
wait 5 ms
loop
a-d.h (178): Error: Missing bit in SET command
a-d.h (179): Error: Missing bit in SET command
a-d.h (180): Error: Missing bit in SET command
The 16F628 doesn't have an A/D converter in it, so ReadAD won't work. You need to use the Pot command (http://gcbasic.sourceforge.net/help/pot.htm), or upgrade to a 16F819, 16F88, or some other chip with an A/D module.
Also, you have a typo - replace "dir portb b.3 out" with "dir portb.3 out".
Hugh thanks again for your help, see you...