Что файлы не цепляет. Вот прошивка. ------------------------------------------------------------------------------------------------------- ;PLL.ASM FOR PIC12C508/9 Programs LMX2326 ;Phase Locked Loop synthesizer to lock at 1.8125GHz. ;(c) John Bishop, Bath Labs Ltd. 21/10/04 V1.0 ;http://www.bathlabs.com ;Please email john.bishop@bathlabs.com if you find ;this code useful or if you would like Bath Labs ;to quote on similar designs or services. ;This code example may be copied and used freely ;for any purpose, commercial or otherwise and is ;offered on a goodwill basis. As such, no warranty or ;assurance of fitness for purpose or accuracy can be ;given, and is used at the operators risk. ;Please include the originator’s information ;in your header. ;********************************************** ; This program holds data bits sequentially on GPIO1 ; while toggling GPIO0 and GPIO2 at appropriate times ; to shift synthesizer configuration information ; into the LMX2326 PLL. ;********************************************** ; DEFINITIONS AND INITIALISATION GPIO EQU 6 ;GPIO is File 6. OSCCAL EQU 5 ;********************************************** LIST P=12C508 ;We are using the 12C508. ORG 0 ;0 is the start address. GOTO START ;goto start ;********************************************** ; SUBROUTINES. ;TOGGLE LE (send Load Enable signal) TOG_LE MOVWF GPIO ;Program value to GPIO port XORLW B'00000100' ;Toggle LE bit (0 to 1) MOVWF GPIO ;Program value to GPIO port XORLW B'00000100' ;Toggle LE bit (1 to 0) MOVWF GPIO ;Program value to GPIO port RETLW 0 ;TOGGLE CK (send Clock signal) TOG_CK MOVWF GPIO ;Program value to GPIO port XORLW B'00000001' ;Toggle CK bit (0 to 1) MOVWF GPIO ;Program value to GPIO port XORLW B'00000001' ;Toggle CK bit (1 to 0) MOVWF GPIO ;Program value to GPIO port RETLW 0 ;********************************************** ; CONFIGURATION. START MOVWF OSCCAL ;Clock calibration. MOVLW B'00001000' ;5 bits of GPIO are O/Ps. Bit3 is INPUT. TRIS GPIO MOVLW B'00000111' OPTION ;PRESCALER is /256 CLRF GPIO ;Clears GPIO ;********************************************** ; MAIN PROGRAM. BEGIN MOVLW B'00000000' ;initial data line state MOVWF GPIO ; NOP ; no operation (for clarity) NOP NOP NOP ;Program F regsiter (MSB first down to [C2,C1] ;then load data using LE) MOVLW B'00110000' ;F19 [Test mode] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;F18 [Powerdown control] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;F17 [Test mode] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;F16 [Test mode] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;F15 [Test mode] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;F14 [Fastlock timeout counter] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;F13 [Fastlock timeout counter] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;F12 [Fastlock timeout counter] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;F11 [Fastlock timeout counter] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;F10 [Timeout counter enable] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;F09 [Fastlock control] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;F08 [Fastlock enable] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;F07 [Charge pump tri-state] CALL TOG_CK ;Toggle Clock MOVLW B'00110010' ;F06 [VCO polarity drive] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;F05 [FoLD control] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;F04 [FoLD control] CALL TOG_CK ;Toggle Clock MOVLW B'00110010' ;F03 [FoLD control] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;F02 [Powerdown control] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;F01 [Counter reset] CALL TOG_CK ;Toggle Clock MOVLW B'00110010' ;C2 CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;C1 CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;No data CALL TOG_LE ;Toggle LE NOP ; no operation (for clarity) NOP ;Program R counter (MSB first down to [C2,C1] ;then load data using LE) MOVLW B'00110000' ;R19 CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;R18 CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;R17 CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;R16 CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;R15 CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;R14 CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;R13 CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;R12 CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;R11 CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;R10 CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;R09 CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;R08 CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;R07 CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;R06 CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;R05 CALL TOG_CK ;Toggle Clock MOVLW B'00110010' ;R04 CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;R03 CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;R02 CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;R01 CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;C2 CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;C1 CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;No data CALL TOG_LE ;Toggle LE NOP ; no operation (for clarity) NOP ;Program N regsiter (MSB first down to [C2,C1] ;then load data using LE) MOVLW B'00110000' ;N19 [GO bit] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;N18 [B13] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;N17 [B12] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;N16 [B11] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;N15 [B10] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;N14 [B9] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;N13 [B8] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;N12 [B7] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;N11 [B6] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;N10 [B5] CALL TOG_CK ;Toggle Clock MOVLW B'00110010' ;N09 [B4] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;N08 [B3] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;N07 [B2] CALL TOG_CK ;Toggle Clock MOVLW B'00110010' ;N06 [B1] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;N05 [A5] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;N04 [A4] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;N03 [A3] CALL TOG_CK ;Toggle Clock MOVLW B'00110010' ;N02 [A2] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;N01 [A1] CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;C2 CALL TOG_CK ;Toggle Clock MOVLW B'00110010' ;C1 CALL TOG_CK ;Toggle Clock MOVLW B'00110000' ;No data CALL TOG_LE ;Toggle LE MOVLW B'00010000' ;Data and load signals off ; leave LE enabled MOVWF GPIO ;send to port ;This is the end of programming sequence - catch loop FINAL NOP NOP GOTO FINAL END --------------------------------------------------------------------------------------------------------------------------------- |