Mixed Signal PICtail™ Demo Board User’s Guide
DS51523A-page 38
2004 Microchip Technology Inc.
movlw .32
endif
if _16_steps
movlw .16
endif
movwf F_Low_Step
movwf F_High_Step
movlw 01Fh
movwf F_Low_Out
movwf F_High_Out
movf TMR0,W
movwf F_Low_Rolling
movwf F_High_Rolling
movlw 0Fh
andwf Key_Value,F
movf Key_Value,W
call F_Low_table
movwf F_Low
movf Key_Value,W
call F_High_table
movwf F_High
Repeat_tone ;Call here to repeat the tone for ToneLength
;The following inits the ToneLength delay reg’s
movf Key_Value,W
call ToneLength_table
movwf ToneLength
test_F_Low ;Low frequency tone loop timer
movf F_Low_Rolling,W
subwf TMR0,W ;result = time since last update
subwf F_Low,W ;Carry bit determines if enough time has elapsed
btfsc STATUS,C
goto test_F_High ;do not update the SINE wave yet
movf F_Low,W
addwf F_Low_Rolling,F ;Very Important to add to the last reference
;instead of using the actual timer value
decfsz F_Low_Step,F ;update the step count
goto no_reset_F_Low_Step
if _32_steps
movlw .32
endif
if _16_steps
movlw .16
endif
movwf F_Low_Step
no_reset_F_Low_Step
movf F_Low_Step,W
call SINE_Table_7bit ;fetch the corresponding Sin value
movwf F_Low_Out ;store result
test_F_High ;High frequency tone loop timer
movf F_High_Rolling,W
subwf TMR0,W ;result = time since last update
subwf F_High,W ;Carry bit determines if enough time has elapsed
btfsc STATUS,C
goto update_output ;do not update the SINE wave yet
movf F_High,W
addwf F_High_Rolling,F ;Very Important to add to the last reference
;instead of using the actual timer value
decfsz F_High_Step,F ;update the step count
Содержание PICtail
Страница 1: ...2004 Microchip Technology Inc DS51523A Mixed Signal PICtail Demo Board User s Guide...
Страница 4: ...Mixed Signal PICtail Demo Board User s Guide DS51523A page iv 2004 Microchip Technology Inc NOTES...
Страница 10: ...Mixed Signal PICtail Demo Board User s Guide DS51523A page 6 2004 Microchip Technology Inc NOTES...
Страница 12: ...Mixed Signal PICtail Demo Board User s Guide DS51523A page 8 2004 Microchip Technology Inc NOTES...
Страница 22: ...Mixed Signal PICtail Demo Board User s Guide DS51523A page 18 2004 Microchip Technology Inc NOTES...
Страница 25: ...Schematics and Layouts 2004 Microchip Technology Inc DS51523A page 21 FIGURE A 1 BOARD SCHEMATIC CONTINUED M...
Страница 27: ...Schematics and Layouts 2004 Microchip Technology Inc DS51523A page 23 FIGURE A 3 BOARD LAYOUT POWER LAYER...
Страница 29: ...Schematics and Layouts 2004 Microchip Technology Inc DS51523A page 25 FIGURE A 5 BOARD LAYOUT BOTTOM LAYER...
Страница 34: ...Mixed Signal PICtail Demo Board User s Guide DS51523A page 30 2004 Microchip Technology Inc NOTES...
Страница 44: ...Mixed Signal PICtail Demo Board User s Guide DS51523A page 40 2004 Microchip Technology Inc NOTES...
Страница 50: ...Mixed Signal PICtail Demo Board User s Guide DS51523A page 46 2004 Microchip Technology Inc NOTES...
Страница 52: ...Mixed Signal PICtail Demo Board User s Guide DS51523A page 48 2004 Microchip Technology Inc NOTES...