Menu

Tone problem?

Help
Jonny!!!
2008-08-15
2013-05-30
  • Jonny!!!

    Jonny!!! - 2008-08-15

    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

     
    • Nobody/Anonymous

      LOL, i missed the # on #define. DERR. Don't I feel like an idiot...

      Works fine!

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.