I tried using the Tone and ShortTone command, and I get these errors during compile time:
speaker_test (14): Error: Syntax Error
sound.h (75): Error: SYSTEMP.0 is not a valid I/O pin or port
My code:
#chip 16F690, 4
#config FCMEN = OFF 'Fail-Safe Clock Monitor Enabled bit
#config IESO = OFF 'IESO: Internal External Switchover bit
#config BOR = OFF 'Brown-out Reset Selection bits
#config CPD = OFF 'Data Code Protection bit
#config CP = OFF 'Code Protection bit
#config MCLRE = On 'MCLR Pin Function Select bit
#config PWRTE = OFF 'Power-up Timer Enable bit
#config WDT = OFF 'Watchdog Timer Enable bit
#config Osc = INTOSC 'Oscillator Selection bits
dir portb.7 out 'speaker
define SoundOut portb.7
goto main
main:
tone 4000, 1000
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried using the Tone and ShortTone command, and I get these errors during compile time:
speaker_test (14): Error: Syntax Error
sound.h (75): Error: SYSTEMP.0 is not a valid I/O pin or port
My code:
#chip 16F690, 4
#config FCMEN = OFF 'Fail-Safe Clock Monitor Enabled bit
#config IESO = OFF 'IESO: Internal External Switchover bit
#config BOR = OFF 'Brown-out Reset Selection bits
#config CPD = OFF 'Data Code Protection bit
#config CP = OFF 'Code Protection bit
#config MCLRE = On 'MCLR Pin Function Select bit
#config PWRTE = OFF 'Power-up Timer Enable bit
#config WDT = OFF 'Watchdog Timer Enable bit
#config Osc = INTOSC 'Oscillator Selection bits
dir portb.7 out 'speaker
define SoundOut portb.7
goto main
main:
tone 4000, 1000
LOL, i missed the # on #define. DERR. Don't I feel like an idiot...
Works fine!