1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

migrating asm code 16C84 to 16C710

Discussion in 'Microcontrollers' started by Brute, Oct 31, 2012.

  1. Brute

    Brute New Member

    Joined:
    Oct 31, 2012
    Messages:
    39
    Likes:
    0
    That is indeed what it supposed to do and does it with C84 but not with C710! I can send you a real chip (so-package) if you wish? The oscillator is fine now, it oscillates at 4MHz.
     
  2. Brute

    Brute New Member

    Joined:
    Oct 31, 2012
    Messages:
    39
    Likes:
    0
    Anyone any thoughts?
     
  3. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,142
    Likes:
    907
    Location:
    Rochdale UK
    Where's you location? I have some pic16c71 's somewhere at work... ( These were the only pics with an ADC a while since ) I only ever bought 4 but I know I only use 2 of them..

    Point is they are on the same datasheet so may be the same... What OSC caps are you using..
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Brute

    Brute New Member

    Joined:
    Oct 31, 2012
    Messages:
    39
    Likes:
    0

    Rotterdam Netherlands here Ian, not really next door. Is the 16C71 erasable?

    I use 18pF smd caps but the oscillator is running okay.
     
  6. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,791
    Likes:
    134
    Location:
    morristown,tn
    No it's a one time chip you need chip with a F like 16FXXX They make some for testing that use UV to erase them
    But they costs big bucks. you could get a cheap 20 16Fxxx for the cost of one UV16C chip
     
  7. Brute

    Brute New Member

    Joined:
    Oct 31, 2012
    Messages:
    39
    Likes:
    0
    Still not working, help, will eat my shoe in a minute..................Tried anything up to ID locations and oscillator speed and all but can't get it right! Spend my tenth chip already, anyone HELP!!!!!!!!
     
  8. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,200
    Likes:
    640
    Location:
    Derbyshire, UK
    ONLINE
    It's quite simple - either buy some JW UV erasable chips, or give up the idea of using OTP devices. It's foolish to try and do program development on OTP chips.
     
  9. Brute

    Brute New Member

    Joined:
    Oct 31, 2012
    Messages:
    39
    Likes:
    0
    Would like to buy one 16C710 uv erasable chip where can I get it?
     
  10. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,142
    Likes:
    907
    Location:
    Rochdale UK
    I doubt you will.... You will be far better off with a flash device.. Chuck those old OTP's in the bin... Grab a couple of pic16F716... You'll never look back.
     
  11. Brute

    Brute New Member

    Joined:
    Oct 31, 2012
    Messages:
    39
    Likes:
    0
    I know what it is like to use those flash controllers like 16F84a or 16F716 but it happened to be that I have quite much left of the 16C710 and wanted to make good use of them in this CTCSS encoder. So no one can explain why these C710 does not the same as the F84 with the same software compiled to C710? Hoped to find some smart programmers here :).
     
  12. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,791
    Likes:
    134
    Location:
    morristown,tn
    Can you post your code that you have for the 16C710
     
  13. Brute

    Brute New Member

    Joined:
    Oct 31, 2012
    Messages:
    39
    Likes:
    0
    Sure:

    ; 14-4-99
    ; Assemble with MPASM
    ; See below for wiring details
    ;
    LIST P=16C710
    __CONFIG 3FF9H ;XTAL OSC @4Mhz,NO WATCHDOG,PWRRST,NO CP.
    __IDLOCS 1234
    ERRORLEVEL -302
    ;
    CNT1 EQU 0CH ;PRESCALLER COUNTER REG 1
    CNT2 EQU 0DH ;PRESCALLER COUNTER REG 2
    CNT3 EQU 0EH ;PRESCALLER COUNTER REG 3
    TONREG EQU 0FH ;REGISTER FOR TONE NUMBER
    PRES1 EQU 10H ;PRESCALLER STORE 1
    PRES2 EQU 11H ;PRESCALLER STORE 2
    PRES3 EQU 12H ;PRESCALLER STORE 3
    PORTA EQU 5
    PORTB EQU 6
    TRISA EQU 85H
    TRISB EQU 86H
    OPTREG EQU 81H
    PC EQU 2
    PULLUP EQU 7
    STATUS EQU 3
    INTCON EQU 0BH
    GIE EQU 7
    RBIE EQU 3
    RBIF EQU 0
    RP0 EQU 5
    OUT EQU 2
    PTT EQU 7
    ;
    GOTO START
    ORG 00C8
    START BSF STATUS,RP0 ;SELECT REG BANK 1
    BSF TRISB,PTT ;SETUP RB7 AS INPUT FOR PTT
    BCF TRISA,OUT ;SETUP RA2 AS OUTPUT FOR TONE
    BCF OPTREG,PULLUP ;SET PULLUP RESISTORS ON PORTB
    MOVLW 0xFF ; SET PORTB AS I/Ps
    MOVWF TRISB ; RB0-RB5 FOR SWITCH INPUTS
    CLRF ADCON1 ; DISABLE ADC
    ;

    BCF STATUS,RP0 ;SELECT REG BANK 0
    BCF INTCON,GIE ;DISABLE GIE INTERUPTS
    BSF INTCON,RBIE ;ENABLE PORT B CHANGE INTERUPT
    MOVF TRISB,W ;READ DIP SWITCHES INTO W
    MOVWF TONREG ;STORE IN 0F REG
    BCF TONREG,6 ; CLEAR BITS 6&7 AS
    BCF TONREG,7 ; THEY ARE IRRELAVANTS
    MOVF TONREG,W ;RE-STORE INTO W
    ADDWF TONREG,F ; MULTIPLY BY 3
    ADDWF TONREG,F ; FOR TONE TABLE OFFSET
    ;
    MOVF TONREG,W ;RELOAD TO W FOR OFFSET
    CALL TONTBL ;GOTO TONE LOOKUP TABLE
    MOVWF PRES1 ;STORE FIRST VALUE FROM TABLE
    ;
    INCF TONREG,F ;INCREMENT FOR NEXT TABLE VALUE
    MOVF TONREG,W ;RELOAD W FOR OFFSET
    CALL TONTBL ;GOTO TONE LOOKUP TABLE
    MOVWF PRES2 ;STORE SECOND VALUE FROM TABLE
    ;
    INCF TONREG,F ;INCREMENT FOR NEXT TABLE VALUE
    MOVF TONREG,W ;RELOAD W FOR OFFSET
    CALL TONTBL ;GOTO TONE LOOKUP TABLE
    MOVWF PRES3 ;STORE THIRD VALUE FROM TABLE
    ;
    ;
    RELOAD
    MOVF PRES1,W ;LOAD W WITH PRESET FOR 1
    MOVWF CNT1 ;PRELOAD PRESCALLER 1
    MOVF PRES2,W ;LOAD W WITH PRESET FOR 3
    MOVWF CNT3 ;PRELOAD PRESCALLER 3
    MOVF PRES3,W ;LOAD W WITH PRESET FOR 2 READY
    PTTCHK
    BTFSC PORTB,PTT ;TEST PTT LINE
    GOTO WAIT ;SLEEP TILL LOW
    CALL CHORUS ;DO DIVIDER/PRESCALLER ROUTINE
    ;
    OUTPUT
    BTFSS PORTA,OUT ;TEST O/P HI OR LO AT PRESENT
    GOTO HI ;IF LO GO SET HI
    GOTO LO ;IF HI GO SET LO
    ;
    HI
    NOP ;BALANCE OUT CYCLE TIME MARK&SPACE
    BSF PORTA,OUT ;MAKE O/P HI
    GOTO RELOAD ;RETURN TO START OF CYCLE
    ;
    LO
    BCF PORTA,OUT ;MAKE O/P LO
    GOTO RELOAD ;RETURN TO START OF CYCLE
    ;
    CHORUS
    PRE1
    DECFSZ CNT1,F ;DECREMENT PRESCALLER 1
    GOTO PRE2
    GOTO FINE ;CALL FINE ADJUST SUBROUTINE
    PRE2 MOVWF CNT2 ;RELOAD PRESCALLER 2
    ;
    PREE DECFSZ CNT2,F ;DECREMENT PRESCALLER 2
    GOTO PREE ;GO BACK AND DECREMENT PRE2 TILL 00
    ;
    GOTO PRE1 ;GO BACK AND DECREMENT PRE1 TILL 00
    ;
    FINE DECFSZ CNT3,F ;DECREMENT PRESCALLER 3
    GOTO FINE ;GO BACK AND DECREMENT PRE3 TILL 00
    RETURN ;RETURN TO CHANGE O/P AND CHECK PTT ETC
    ;
    WAIT
    BCF INTCON,RBIF ;CLEAR PORT B CHANGE INT FLAG
    SLEEP ;SLEEP AND WAIT FOR PTT
    NOP
    BCF INTCON,GIE ;DISABLE GLOBAL INTERUPTS AGAIN
    GOTO PTTCHK ;CHECK IF PTT PASSES TEST
    ;
    ;
    ;
    ;TONES TABLE AT 0008H
    ORG 0007H
    TONTBL
    ADDWF PC,F ; W+PC ->PC, JUMP DOWN TABLE
    ;
    ;
    ; 16c710 PIN
    ; 11 10 9 8 7 6
    ; TONE FREQ RB5 RB4 RB3 RB2 RB1 RB0
    ;
    DT 02,01,0x9D ; 000 1Khz TEST 0 0 0 0 0 0
    DT 86,82,10 ; 001 67.0 0 0 0 0 0 1
    DT 81,85,10 ; 002 69.4 * 0 0 0 0 1 0
    DT 84,80,0x0F ; 003 71.9 0 0 0 0 1 1
    DT 7F,85,0x0F ; 004 74.4 0 0 0 1 0 0
    DT 7B,7C,0x0F ; 005 77.0 0 0 0 1 0 1
    DT 76,86,0x0F ; 006 79.7 0 0 0 1 1 0
    DT 72,82,0x0F ; 007 82.5 0 0 0 1 1 1
    DT 74,8F,0x0E ; 008 85.4 0 0 1 0 0 0
    DT 63,91,10 ; 009 88.5 0 0 1 0 0 1
    DT 5F,9A,10 ; 010 91.5 0 0 1 0 1 0
    DT 5B,47,11 ; 011 94.8 0 0 1 0 1 1
    DT 55,88,11 ; 012 97.4 0 0 1 1 0 0
    DT 56,49,11 ; 013 100.0 0 0 1 1 0 1
    DT 09,6E,0xB9 ; 014 103.5 0 0 1 1 1 0
    DT 08,81,0xC9 ; 015 107.2 0 0 1 1 1 1
    DT 0A,71,98 ; 016 110.9 0 1 0 0 0 0
    DT 0B,76,83 ; 017 114.8 0 1 0 0 0 1
    DT 0A,0xCA,83 ; 018 118.8 0 1 0 0 1 0
    DT 0A,9A,83 ; 019 123.0 0 1 0 0 1 1
    DT 09,0xF1,83 ; 020 127.3 0 1 0 1 0 0
    DT 08,93,9D ; 021 131.8 0 1 0 1 0 1
    DT 07,94,0xB0 ; 022 136.5 0 1 0 1 1 0
    DT 07,7C,0xAD ; 023 141.3 0 1 0 1 1 1
    DT 07,85,0xA5 ; 024 146.2 0 1 1 0 0 0
    DT 08,7B,89 ; 025 151.4 0 1 1 0 0 1
    DT 08,80,83 ; 026 156.7 0 1 1 0 1 0
    DT 07,0xA2,90 ; 027 159.8 * 0 1 1 0 1 1
    DT 08,47,86 ; 028 162.2 0 1 1 1 0 0
    DT 07,60,95 ; 029 165.5 * 0 1 1 1 0 1
    DT 08,86,78 ; 030 167.9 0 1 1 1 1 0
    DT 07,92,87 ; 031 171.3 * 0 1 1 1 1 1
    DT 07,90,85 ; 032 173.8 1 0 0 0 0 0
    DT 07,7D,85 ; 033 177.3 * 1 0 0 0 0 1
    DT 09,5A,66 ; 034 179.9 1 0 0 0 1 0
    DT 09,48,66 ; 035 183.5 * 1 0 0 0 1 1
    DT 07,9E,78 ; 036 186.2 1 0 0 1 0 0
    DT 08,0xBB,60 ; 037 189.9 * 1 0 0 1 0 1
    DT 09,4C,60 ; 038 192.8 1 0 0 1 1 0
    DT 08,9D,60 ; 039 196.6 * 1 0 0 1 1 1
    DT 09,2F,60 ; 040 199.5 * 1 0 1 0 0 0
    DT 07,82,70 ; 041 203.5 1 0 1 0 0 1
    DT 07,76,70 ; 042 206.5 * 1 0 1 0 1 0
    DT 07,66,70 ; 043 210.7 1 0 1 0 1 1
    DT 07,6F,6A ; 044 218.1 1 0 1 1 0 0
    DT 06,0xA3,70 ; 045 225.7 1 0 1 1 0 1
    DT 06,98,70 ; 046 229.1 * 1 0 1 1 1 0
    DT 06,8A,70 ; 047 233.6 1 0 1 1 1 1
    DT 06,72,70 ; 048 241.8 1 1 0 0 0 0
    DT 04,0xC3,99 ; 049 250.3 1 1 0 0 0 1
    DT 04,0xB9,99 ; 050 254.1 * 1 1 0 0 1 0
    DT 05,1C,99 ; 051 255 * 1 1 0 0 1 1
    DT 03,15,20 ; 052 1750 Eu Tone 1 1 0 1 0 0
    DT 05,0F,10 ; 053 1800 Eu Tone 1 1 0 1 0 1
    DT 01,84,9D ; 054 1200 Packet 1 1 0 1 1 0
    DT 02,13,30 ; 055 2200 Packet 1 1 0 1 1 1
    DT 03,26,50 ; 056 800 * 1 1 1 0 0 0
    DT 03,0F,50 ; 057 900 * 1 1 1 0 0 1
    DT 02,3F,50 ; 058 1100 * 1 1 1 0 1 0
    DT 03,36,20 ; 059 1300 * 1 1 1 0 1 1
    DT 01,68,20 ; 060 1500 * 1 1 1 1 0 0
    DT 03,09,20 ; 061 2000 * 1 1 1 1 0 1
    DT 02,1A,20 ; 062 2500 * 1 1 1 1 1 0
    DT 02,07,20 ; 063 3500 * 1 1 1 1 1 1
    ;
    ; * Indicates non EIA standard tone
    ;

    END


    All CTCSS tones are within EIA standard of .08% .
    Use a 4Mhz crystal with 2x18pF capacitors.
    PTT line is active LOW. PTT is RB7 Pin 13.
    OUTPUT tone is on RA2 Pin1 ,see Low pass filter diag.
    Lines RB0-RB5 can be fitted with DIP switches to set
    tone frequencies as per table above. A 1 on the table
    indicates the RB pin is logic HI . All RB port pins have
    been programmed with internal pullup resistors and will
    float HI if left open. The binary inputs are read only on
    power up and not each time the PTT is keyed.

    For CTCSS tones use a Low pass filter as shown here as the
    output waveform is square. RO is an padding resistor to
    allow for level adjustment typically 20k.


    RA2--------2k2----------RO----Output
    Pin1 |
    |
    1uF
    |
    GND
     
  14. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,791
    Likes:
    134
    Location:
    morristown,tn
    One more thing the chip you program it's not make 1 any tone? 2 some tone ?
     
  15. Brute

    Brute New Member

    Joined:
    Oct 31, 2012
    Messages:
    39
    Likes:
    0
  16. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,791
    Likes:
    134
    Location:
    morristown,tn
    Well here my thinking im going to make sure im right but the 16C710 is haft the chip the 16C84 is.

    512 half a of 1K that's the 16C710 and the 16C84 is 1k that may put your table in no man's land
     
  17. Brute

    Brute New Member

    Joined:
    Oct 31, 2012
    Messages:
    39
    Likes:
    0
    BTW I've extentially tested it at 88.5Hz like 001001 from rb5 to rb0 but that couldn't be the problem I guess..........did not test it at other frequencies. Just use it for 88.5Hz.
     
  18. Brute

    Brute New Member

    Joined:
    Oct 31, 2012
    Messages:
    39
    Likes:
    0
    Can we forget the table and just let it produce 88.5Hz?
     
  19. Brute

    Brute New Member

    Joined:
    Oct 31, 2012
    Messages:
    39
    Likes:
    0
    But I've assembled it with MPLAB and that went all good no errors nothing............simulating goes ok as well but it hangs quite long in a certain loop.
     
  20. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,791
    Likes:
    134
    Location:
    morristown,tn
    Well the tables don't make a error the compiler happily over writes code sometimes.

    Na not that but see if this fixed it ADCON1 set's A2 to Analog input need set the PCFG1:pCFG0: A/D Port Configuration Control bits

    Code (text):


         LIST P=16C710
        #include <p16c710.inc>
        __CONFIG 3FF9H ;XTAL OSC @4Mhz,NO WATCHDOG,PWRRST,NO CP.
            __IDLOCS 1234
            ERRORLEVEL -302
    ;    
    CNT1    EQU 0CH ;PRESCALLER COUNTER REG 1
    CNT2    EQU 0DH ;PRESCALLER COUNTER REG 2
    CNT3    EQU 0EH ;PRESCALLER COUNTER REG 3
    TONREG  EQU 0FH ;REGISTER FOR TONE NUMBER
    PRES1   EQU 10H ;PRESCALLER STORE 1
    PRES2   EQU 11H ;PRESCALLER STORE 2
    PRES3   EQU 12H ;PRESCALLER STORE 3
    PORTA   EQU 5
    PORTB   EQU 6
    TRISA   EQU 85H
    TRISB   EQU 86H
    OPTREG  EQU 81H
    PC  EQU 2
    PULLUP  EQU 7
    STATUS  EQU 3
    INTCON  EQU 0BH
    GIE EQU 7
    RBIE    EQU 3
    RBIF    EQU 0
    RP0 EQU 5
    OUT EQU 2
    PTT     EQU 7
    ;  

        ORG 00C8
            GOTO    START
    START
        banksel ADCON0
        clrf    ADCON0   ; DISABLE ADC
        movlw  0x3
        banksel ADCON1
        movwf   ADCON1
        ;
        BSF STATUS,RP0  ;SELECT REG BANK 1
        BSF     TRISB,PTT   ;SETUP RB7 AS INPUT FOR PTT
        BCF TRISA,OUT   ;SETUP RA2 AS OUTPUT FOR TONE
        BCF OPTREG,PULLUP   ;SET PULLUP RESISTORS ON PORTB
        MOVLW   0xFF     ; SET PORTB AS I/Ps
        MOVWF   TRISB    ; RB0-RB5 FOR SWITCH INPUTS

       
       

        BCF STATUS,RP0  ;SELECT REG BANK 0
        BCF INTCON,GIE  ;DISABLE GIE INTERUPTS
        BSF INTCON,RBIE ;ENABLE PORT B CHANGE INTERUPT
        MOVF    TRISB,W  ;READ DIP SWITCHES INTO W
        MOVWF   TONREG   ;STORE IN 0F REG
        BCF TONREG,6    ; CLEAR BITS 6&7 AS
        BCF TONREG,7    ; THEY ARE IRRELAVANTS
        MOVF    TONREG,W    ;RE-STORE INTO W
        ADDWF   TONREG,F    ; MULTIPLY BY 3
        ADDWF   TONREG,F    ; FOR TONE TABLE OFFSET
        ;
        MOVF    TONREG,W    ;RELOAD TO W FOR OFFSET
        CALL    TONTBL   ;GOTO TONE LOOKUP TABLE
        MOVWF   PRES1    ;STORE FIRST VALUE FROM TABLE
        ;
        INCF    TONREG,F    ;INCREMENT FOR NEXT TABLE VALUE
        MOVF    TONREG,W    ;RELOAD W FOR OFFSET
        CALL    TONTBL   ;GOTO TONE LOOKUP TABLE
        MOVWF   PRES2    ;STORE SECOND VALUE FROM TABLE
        ;
        INCF    TONREG,F    ;INCREMENT FOR NEXT TABLE VALUE
        MOVF    TONREG,W    ;RELOAD W FOR OFFSET
        CALL    TONTBL   ;GOTO TONE LOOKUP TABLE
        MOVWF   PRES3    ;STORE THIRD VALUE FROM TABLE
        ;
        ;
    RELOAD
        MOVF    PRES1,W  ;LOAD W WITH PRESET FOR 1
        MOVWF   CNT1     ;PRELOAD PRESCALLER 1
        MOVF    PRES2,W  ;LOAD W WITH PRESET FOR 3
        MOVWF   CNT3     ;PRELOAD PRESCALLER 3
        MOVF    PRES3,W  ;LOAD W WITH PRESET FOR 2 READY
    PTTCHK
        BTFSC   PORTB,PTT   ;TEST PTT LINE
        GOTO    WAIT     ;SLEEP TILL LOW
        CALL    CHORUS   ;DO DIVIDER/PRESCALLER ROUTINE
        ;
        OUTPUT
        BTFSS   PORTA,OUT   ;TEST O/P HI OR LO AT PRESENT
        GOTO    HI   ;IF LO GO SET HI
        GOTO    LO   ;IF HI GO SET LO
        ;
    HI
        NOP  ;BALANCE OUT CYCLE TIME MARK&SPACE
        BSF PORTA,OUT   ;MAKE O/P HI
        GOTO    RELOAD   ;RETURN TO START OF CYCLE
        ;
    LO
        BCF PORTA,OUT   ;MAKE O/P LO
        GOTO    RELOAD   ;RETURN TO START OF CYCLE
        ;
    CHORUS
        PRE1   
        DECFSZ  CNT1,F   ;DECREMENT PRESCALLER 1
        GOTO    PRE2
        GOTO    FINE     ;CALL FINE ADJUST SUBROUTINE
    PRE2    MOVWF   CNT2     ;RELOAD PRESCALLER 2
        ;
    PREE    DECFSZ CNT2,F    ;DECREMENT PRESCALLER 2   
        GOTO    PREE     ;GO BACK AND DECREMENT PRE2 TILL 00
        ;
        GOTO    PRE1     ;GO BACK AND DECREMENT PRE1 TILL 00
        ;
    FINE    DECFSZ  CNT3,F   ;DECREMENT PRESCALLER 3
        GOTO    FINE     ;GO BACK AND DECREMENT PRE3 TILL 00
        RETURN   ;RETURN TO CHANGE O/P AND CHECK PTT ETC
    ;
    WAIT
        BCF INTCON,RBIF ;CLEAR PORT B CHANGE INT FLAG
        SLEEP    ;SLEEP AND WAIT FOR PTT
        NOP
        BCF INTCON,GIE  ;DISABLE GLOBAL INTERUPTS AGAIN
        GOTO    PTTCHK   ;CHECK IF PTT PASSES TEST
        ;
        ;
        ;
        ;TONES TABLE AT 0008H
        ORG 0007H
        TONTBL
        ADDWF   PC,F     ; W+PC ->PC, JUMP DOWN TABLE
        ;
        ;
        ;    16c710 PIN
        ; 11 10 9 8 7 6
        ;    TONE FREQ RB5 RB4 RB3 RB2 RB1 RB0
        ;
        DT  02,01,0x9D  ; 000 1Khz TEST 0 0 0 0 0 0
        DT  86,82,10    ; 001 67.0 0 0 0 0 0 1
        DT  81,85,10    ; 002 69.4 * 0 0 0 0 1 0
        DT  84,80,0x0F  ; 003 71.9 0 0 0 0 1 1
        DT  7F,85,0x0F ; 004 74.4 0 0 0 1 0 0
        DT  7B,7C,0x0F  ; 005 77.0 0 0 0 1 0 1
        DT  76,86,0x0F  ; 006 79.7 0 0 0 1 1 0
        DT  72,82,0x0F  ; 007 82.5   0 0 0 1 1 1
        DT  74,8F,0x0E  ; 008 85.4   0 0 1 0 0 0
        DT  63,91,10    ; 009 88.5   0 0 1 0 0 1
        DT  5F,9A,10    ; 010 91.5   0 0 1 0 1 0
        DT  5B,47,11    ; 011 94.8   0 0 1 0 1 1
        DT  55,88,11    ; 012 97.4   0 0 1 1 0 0
        DT  56,49,11    ; 013 100.0  0 0 1 1 0 1
        DT  09,6E,0xB9 ; 014 103.5   0 0 1 1 1 0
        DT  08,81,0xC9  ; 015 107.2  0 0 1 1 1 1
        DT  0A,71,98    ; 016 110.9  0 1 0 0 0 0
        DT  0B,76,83    ; 017 114.8  0 1 0 0 0 1
        DT  0A,0xCA,83  ; 018 118.8  0 1 0 0 1 0
        DT  0A,9A,83    ; 019 123.0  0 1 0 0 1 1
        DT  09,0xF1,83  ; 020 127.3  0 1 0 1 0 0
        DT  08,93,9D    ; 021 131.8  0 1 0 1 0 1
        DT  07,94,0xB0  ; 022 136.5  0 1 0 1 1 0
        DT  07,7C,0xAD  ; 023 141.3 0 1 0 1 1 1
        DT  07,85,0xA5  ; 024 146.2 0 1 1 0 0 0
        DT  08,7B,89    ; 025 151.4 0 1 1 0 0 1
        DT  08,80,83    ; 026 156.7 0 1 1 0 1 0
        DT  07,0xA2,90  ; 027 159.8 * 0 1 1 0 1 1
            DT  08,47,86    ; 028 162.2 0 1 1 1 0 0
        DT  07,60,95    ; 029 165.5 * 0 1 1 1 0 1
        DT  08,86,78    ; 030 167.9 0 1 1 1 1 0
        DT  07,92,87    ; 031 171.3 * 0 1 1 1 1 1
        DT  07,90,85    ; 032 173.8 1 0 0 0 0 0
        DT  07,7D,85    ; 033 177.3 * 1 0 0 0 0 1
        DT  09,5A,66    ; 034 179.9 1 0 0 0 1 0
        DT  09,48,66    ; 035 183.5 * 1 0 0 0 1 1
        DT  07,9E,78    ; 036 186.2 1 0 0 1 0 0
        DT  08,0xBB,60  ; 037 189.9 * 1 0 0 1 0 1
        DT  09,4C,60    ; 038 192.8 1 0 0 1 1 0
        DT  08,9D,60    ; 039 196.6 * 1 0 0 1 1 1
        DT  09,2F,60    ; 040 199.5 * 1 0 1 0 0 0
        DT  07,82,70    ; 041 203.5 1 0 1 0 0 1
        DT  07,76,70    ; 042 206.5 * 1 0 1 0 1 0
        DT  07,66,70    ; 043 210.7 1 0 1 0 1 1
        DT  07,6F,6A    ; 044 218.1 1 0 1 1 0 0
        DT  06,0xA3,70  ; 045 225.7 1 0 1 1 0 1
        DT  06,98,70    ; 046 229.1 * 1 0 1 1 1 0
        DT  06,8A,70    ; 047 233.6 1 0 1 1 1 1
        DT  06,72,70    ; 048 241.8 1 1 0 0 0 0
        DT  04,0xC3,99  ; 049 250.3 1 1 0 0 0 1
        DT  04,0xB9,99  ; 050 254.1 * 1 1 0 0 1 0
        DT  05,1C,99    ; 051 255 * 1 1 0 0 1 1
        DT  03,15,20    ; 052 1750 Eu Tone 1 1 0 1 0 0
        DT  05,0F,10    ; 053 1800 Eu Tone 1 1 0 1 0 1
        DT  01,84,9D    ; 054 1200 Packet 1 1 0 1 1 0
        DT  02,13,30    ; 055 2200 Packet 1 1 0 1 1 1
        DT  03,26,50    ; 056 800 * 1 1 1 0 0 0
        DT  03,0F,50    ; 057 900 * 1 1 1 0 0 1
        DT  02,3F,50    ; 058 1100 * 1 1 1 0 1 0
        DT  03,36,20    ; 059 1300 * 1 1 1 0 1 1
        DT  01,68,20    ; 060 1500 * 1 1 1 1 0 0
        DT  03,09,20    ; 061 2000 * 1 1 1 1 0 1
        DT  02,1A,20    ; 062 2500 * 1 1 1 1 1 0
        DT  02,07,20    ; 063 3500 * 1 1 1 1 1 1
        ;
        ;    * Indicates non EIA standard tone
            ;

        END


    All CTCSS tones are within EIA standard of .08% .
    Use a 4Mhz crystal with 2x18pF capacitors.
    PTT line is active LOW. PTT is RB7 Pin 13.
    OUTPUT tone is on RA2 Pin1 ,see Low pass filter diag.
    Lines RB0-RB5 can be fitted with DIP switches to set
    tone frequencies as per table above. A 1 on the table
    indicates the RB pin is logic HI . All RB port pins have
    been programmed with internal pullup resistors and will
    float HI if left open. The binary inputs are read only on
    power up and not each time the PTT is keyed.

    For CTCSS tones use a Low pass filter as shown here as the
    output waveform is square. RO is an padding resistor to
    allow for level adjustment typically 20k.


    RA2--------2k2----------RO----Output
    Pin1     |
    |
    1uF
    |
    GND
     
     
    Last edited: Nov 16, 2012
  21. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,791
    Likes:
    134
    Location:
    morristown,tn
    That should fixed you up there can't get anything out of a input pin Hold up don't burn any chips yet. give me about a hour

    It's still not setting your output pin right

    I found that problem now to fix that the code is jumping over your setup code
     
    Last edited: Nov 16, 2012

Share This Page