Problem with comparison.
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/USB Device - MCHPUSB - Generic Driver - C18 - PIC18F4550.mcw |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/CleanUp.bat |
---|
0,0 → 1,92 |
@echo off |
REM Remove files generated by compiler in this directory |
REM and all subdirectories. |
echo Removing *.$$$ files... |
del *.$$$ /f /q /s |
echo. |
echo Removing *.bkx files... |
del *.bkx /f /q /s |
echo. |
echo Removing *.cce files... |
del *.cce /f /q /s |
echo. |
echo Removing *.cod files... |
del *.cod /f /q /s |
echo. |
echo Removing *.cof files... |
del *.cof /f /q /s |
echo. |
echo Removing *.err files... |
del *.err /f /q /s |
echo. |
echo Removing *.hex files... |
del *.hex /f /q /s |
echo. |
echo Removing *.i files... |
del *.i /f /q /s |
echo. |
echo Removing *.lde files... |
del *.lde /f /q /s |
echo. |
echo Removing *.lst files... |
del *.lst /f /q /s |
echo. |
echo Removing *.obj files... |
del *.obj /f /q /s |
echo. |
echo Removing *.o files... |
del *.o /f /q /s |
echo. |
echo Removing *.rlf files... |
del *.rlf /f /q /s |
echo. |
echo Removing *.sym files... |
del *.sym /f /q /s |
echo. |
echo Removing *.sdb files... |
del *.sdb /f /q /s |
echo. |
echo Removing *.wat files... |
del *.wat /f /q /s |
echo. |
echo Removing *.mcs files... |
del *.mcs /f /q /s |
echo. |
echo Removing *.mptags files... |
del *.mptags /f /q /s |
echo. |
echo Removing *.tagsrc files... |
del *.tagsrc /f /q /s |
echo. |
echo Removing *.map files... |
del *.map /f /q /s |
echo. |
echo Removing *.elf files... |
del *.elf /f /q /s |
echo. |
rd Objects /S /Q |
echo Done. |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/HardwareProfile - Low Pin Count USB Development Kit.h |
---|
0,0 → 1,135 |
/******************************************************************** |
FileName: HardwareProfile - Low Pin Count USB Development Kit.h |
Dependencies: See INCLUDES section |
Processor: PIC18 or PIC24 USB Microcontrollers |
Hardware: Low Pin Count USB Development Kit |
Compiler: Microchip C18 |
Company: Microchip Technology, Inc. |
Software License Agreement: |
The software supplied herewith by Microchip Technology Incorporated |
(the Company) for its PIC® Microcontroller is intended and |
supplied to you, the Companys customer, for use solely and |
exclusively on Microchip PIC Microcontroller products. The |
software is owned by the Company and/or its supplier, and is |
protected under applicable copyright laws. All rights are reserved. |
Any use in violation of the foregoing restrictions may subject the |
user to criminal sanctions under applicable laws, as well as to |
civil liability for the breach of the terms and conditions of this |
license. |
THIS SOFTWARE IS PROVIDED IN AN AS IS CONDITION. NO WARRANTIES, |
WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED |
TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, |
IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR |
CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
******************************************************************** |
File Description: |
Change History: |
Rev Date Description |
1.0 11/19/2004 Initial release |
2.1 02/26/2007 Updated for simplicity and to use common |
coding style |
2.3 09/15/2008 Broke out each hardware platform into its own |
"HardwareProfile - xxx.h" file |
********************************************************************/ |
#ifndef HARDWARE_PROFILE_LOW_PIN_COUNT_USB_DEVELOPMENT_KIT_H |
#define HARDWARE_PROFILE_LOW_PIN_COUNT_USB_DEVELOPMENT_KIT_H |
/*******************************************************************/ |
/******** USB stack hardware selection options *********************/ |
/*******************************************************************/ |
//This section is the set of definitions required by the MCHPFSUSB |
// framework. These definitions tell the firmware what mode it is |
// running in, and where it can find the results to some information |
// that the stack needs. |
//These definitions are required by every application developed with |
// this revision of the MCHPFSUSB framework. Please review each |
// option carefully and determine which options are desired/required |
// for your application. |
//#define USE_SELF_POWER_SENSE_IO |
#define tris_self_power TRISAbits.TRISA2 // Input |
#if defined(USE_SELF_POWER_SENSE_IO) |
#define self_power PORTAbits.RA2 |
#else |
#define self_power 1 |
#endif |
//#define USE_USB_BUS_SENSE_IO |
#define tris_usb_bus_sense TRISAbits.TRISA1 // Input |
#if defined(USE_USB_BUS_SENSE_IO) |
#define USB_BUS_SENSE PORTAbits.RA1 |
#else |
#define USB_BUS_SENSE 1 |
#endif |
/*******************************************************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/******** Application specific definitions *************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
//Uncomment the following line to make the output HEX of this |
// project work with the HID Bootloader |
#define PROGRAMMABLE_WITH_USB_HID_BOOTLOADER |
/** Board definition ***********************************************/ |
//These defintions will tell the main() function which board is |
// currently selected. This will allow the application to add |
// the correct configuration bits as wells use the correct |
// initialization functions for the board. These defitions are only |
// required in the stack provided demos. They are not required in |
// final application design. |
#define DEMO_BOARD LOW_PIN_COUNT_USB_DEVELOPMENT_KIT |
#define LOW_PIN_COUNT_USB_DEVELOPMENT_KIT |
#define CLOCK_FREQ 48000000 |
/** LED ************************************************************/ |
#define mInitAllLEDs() LATC &= 0xF0; TRISC &= 0xF0; |
#define mLED_1 LATCbits.LATC0 |
#define mLED_2 LATCbits.LATC1 |
#define mLED_3 LATCbits.LATC2 |
#define mLED_4 LATCbits.LATC3 |
#define mGetLED_1() mLED_1 |
#define mGetLED_2() mLED_2 |
#define mGetLED_3() mLED_3 |
#define mGetLED_4() mLED_4 |
#define mLED_1_On() mLED_1 = 1; |
#define mLED_2_On() mLED_2 = 1; |
#define mLED_3_On() mLED_3 = 1; |
#define mLED_4_On() mLED_4 = 1; |
#define mLED_1_Off() mLED_1 = 0; |
#define mLED_2_Off() mLED_2 = 0; |
#define mLED_3_Off() mLED_3 = 0; |
#define mLED_4_Off() mLED_4 = 0; |
#define mLED_1_Toggle() mLED_1 = !mLED_1; |
#define mLED_2_Toggle() mLED_2 = !mLED_2; |
#define mLED_3_Toggle() mLED_3 = !mLED_3; |
#define mLED_4_Toggle() mLED_4 = !mLED_4; |
/** SWITCH *********************************************************/ |
#define mInitSwitch2() //TRISAbits.TRISA3=1 |
//only one switch available so double duty |
#define mInitSwitch3() //TRISAbits.TRISA3=1 |
#define sw2 PORTAbits.RA3 |
#define sw3 PORTAbits.RA3 |
#define mInitAllSwitches() mInitSwitch2(); |
/** POT ************************************************************/ |
#define mInitPOT() {TRISBbits.TRISB4=1;ADCON0=0x29;ADCON1=0;ADCON2=0x3E;ADCON2bits.ADFM = 1;} |
#endif //HARDWARE_PROFILE_LOW_PIN_COUNT_USB_DEVELOPMENT_KIT_H |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/HardwareProfile - PIC18F46J50 PIM.h |
---|
0,0 → 1,130 |
/******************************************************************** |
FileName: HardwareProfile - PIC18F46J50 PIM.h |
Dependencies: See INCLUDES section |
Processor: PIC18 USB Microcontrollers |
Hardware: PIC18F46J50 PIM |
Compiler: Microchip C18 |
Company: Microchip Technology, Inc. |
Software License Agreement: |
The software supplied herewith by Microchip Technology Incorporated |
(the Company) for its PIC® Microcontroller is intended and |
supplied to you, the Companys customer, for use solely and |
exclusively on Microchip PIC Microcontroller products. The |
software is owned by the Company and/or its supplier, and is |
protected under applicable copyright laws. All rights are reserved. |
Any use in violation of the foregoing restrictions may subject the |
user to criminal sanctions under applicable laws, as well as to |
civil liability for the breach of the terms and conditions of this |
license. |
THIS SOFTWARE IS PROVIDED IN AN AS IS CONDITION. NO WARRANTIES, |
WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED |
TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, |
IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR |
CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
******************************************************************** |
File Description: |
Change History: |
Rev Date Description |
1.0 11/19/2004 Initial release |
2.1 02/26/2007 Updated for simplicity and to use common |
coding style |
2.3 09/15/2008 Broke out each hardware platform into its own |
"HardwareProfile - xxx.h" file |
********************************************************************/ |
#ifndef HARDWARE_PROFILE_PIC18F46J50_PIM_H |
#define HARDWARE_PROFILE_PIC18F46J50_PIM_H |
/*******************************************************************/ |
/******** USB stack hardware selection options *********************/ |
/*******************************************************************/ |
//This section is the set of definitions required by the MCHPFSUSB |
// framework. These definitions tell the firmware what mode it is |
// running in, and where it can find the results to some information |
// that the stack needs. |
//These definitions are required by every application developed with |
// this revision of the MCHPFSUSB framework. Please review each |
// option carefully and determine which options are desired/required |
// for your application. |
//#define USE_SELF_POWER_SENSE_IO |
#define tris_self_power TRISCbits.TRISC2 // Input |
#define self_power 1 |
//#define USE_USB_BUS_SENSE_IO |
#define tris_usb_bus_sense TRISCbits.TRISC2 // Input |
#define USB_BUS_SENSE 1 |
//Uncomment this to make the output HEX of this project |
// to be able to be bootloaded using the HID bootloader |
#define PROGRAMMABLE_WITH_USB_HID_BOOTLOADER |
/*******************************************************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/******** Application specific definitions *************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/** Board definition ***********************************************/ |
//These defintions will tell the main() function which board is |
// currently selected. This will allow the application to add |
// the correct configuration bits as wells use the correct |
// initialization functions for the board. These defitions are only |
// required in the stack provided demos. They are not required in |
// final application design. |
#define DEMO_BOARD PIC18F46J50_PIM |
#define PIC18F46J50_PIM |
#define CLOCK_FREQ 48000000 |
#define GetSystemClock() CLOCK_FREQ |
#define GetInstructionClock() GetSystemClock() |
/** LED ************************************************************/ |
#define mInitAllLEDs() LATE &= 0xFC; TRISE &= 0xFC; |
#define mLED_1 LATEbits.LATE0 |
#define mLED_2 LATEbits.LATE1 |
#define mLED_3 mLED_1 |
#define mLED_4 mLED_2 |
#define mGetLED_1() mLED_1 |
#define mGetLED_2() mLED_2 |
#define mGetLED_3() mLED_3 |
#define mGetLED_4() mLED_4 |
#define mLED_1_On() mLED_1 = 1; |
#define mLED_2_On() mLED_2 = 1; |
#define mLED_3_On() mLED_3 = 1; |
#define mLED_4_On() mLED_4 = 1; |
#define mLED_1_Off() mLED_1 = 0; |
#define mLED_2_Off() mLED_2 = 0; |
#define mLED_3_Off() mLED_3 = 0; |
#define mLED_4_Off() mLED_4 = 0; |
#define mLED_1_Toggle() mLED_1 = !mLED_1; |
#define mLED_2_Toggle() mLED_2 = !mLED_2; |
#define mLED_3_Toggle() mLED_3 = !mLED_3; |
#define mLED_4_Toggle() mLED_4 = !mLED_4; |
/** SWITCH *********************************************************/ |
#define mInitSwitch2() TRISBbits.TRISB2=1; |
#define mInitSwitch3() mInitSwitch2(); |
#define mInitAllSwitches() mInitSwitch2(); |
#define sw2 PORTBbits.RB2 |
#define sw3 PORTBbits.RB2 |
/** POT ************************************************************/ |
#define mInitPOT() {TRISAbits.TRISA0=1; \ |
ANCON0bits.PCFG0 = 0; \ |
ADCON0=0x01; \ |
ADCON1=0xBE;} // POT on HPC Explorer |
#endif //HARDWARE_PROFILE_PIC18F46J50_PIM_H |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/HardwareProfile - PIC18F87J50 PIM.h |
---|
0,0 → 1,150 |
/******************************************************************** |
FileName: HardwareProfile - PIC18F87J50 PIM.h |
Dependencies: See INCLUDES section |
Processor: PIC18 USB Microcontrollers |
Hardware: PIC18F87J50 PIM |
Compiler: Microchip C18 |
Company: Microchip Technology, Inc. |
Software License Agreement: |
The software supplied herewith by Microchip Technology Incorporated |
(the Company) for its PIC® Microcontroller is intended and |
supplied to you, the Companys customer, for use solely and |
exclusively on Microchip PIC Microcontroller products. The |
software is owned by the Company and/or its supplier, and is |
protected under applicable copyright laws. All rights are reserved. |
Any use in violation of the foregoing restrictions may subject the |
user to criminal sanctions under applicable laws, as well as to |
civil liability for the breach of the terms and conditions of this |
license. |
THIS SOFTWARE IS PROVIDED IN AN AS IS CONDITION. NO WARRANTIES, |
WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED |
TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, |
IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR |
CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
******************************************************************** |
File Description: |
Change History: |
Rev Date Description |
1.0 11/19/2004 Initial release |
2.1 02/26/2007 Updated for simplicity and to use common |
coding style |
2.3 09/15/2008 Broke out each hardware platform into its own |
"HardwareProfile - xxx.h" file |
********************************************************************/ |
#ifndef HARDWARE_PROFILE_PIC18F87J50_PIM_H |
#define HARDWARE_PROFILE_PIC18F87J50_PIM_H |
/*******************************************************************/ |
/******** USB stack hardware selection options *********************/ |
/*******************************************************************/ |
//This section is the set of definitions required by the MCHPFSUSB |
// framework. These definitions tell the firmware what mode it is |
// running in, and where it can find the results to some information |
// that the stack needs. |
//These definitions are required by every application developed with |
// this revision of the MCHPFSUSB framework. Please review each |
// option carefully and determine which options are desired/required |
// for your application. |
/** USB ************************************************************/ |
//The PIC18F87J50 FS USB Plug-In Module supports the USE_USB_BUS_SENSE_IO |
//feature. The USE_SELF_POWER_SENSE_IO feature is not implemented on the |
//circuit board, so the USE_SELF_POWER_SENSE_IO define should always be |
//commented for this hardware platform. |
//#define USE_SELF_POWER_SENSE_IO |
#define tris_self_power TRISAbits.TRISA2 // Input |
#if defined(USE_SELF_POWER_SENSE_IO) |
#define self_power PORTAbits.RA2 |
#else |
#define self_power 1 |
#endif |
//#define USE_USB_BUS_SENSE_IO //JP1 must be in R-U position to use this feature on this board |
#define tris_usb_bus_sense TRISBbits.TRISB5 // Input |
#if defined(USE_USB_BUS_SENSE_IO) |
#define USB_BUS_SENSE PORTBbits.RB5 |
#else |
#define USB_BUS_SENSE 1 |
#endif |
//Uncomment this to make the output HEX of this project |
// to be able to be bootloaded using the HID bootloader |
#define PROGRAMMABLE_WITH_USB_HID_BOOTLOADER |
/*******************************************************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/******** Application specific definitions *************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/** Board definition ***********************************************/ |
//These defintions will tell the main() function which board is |
// currently selected. This will allow the application to add |
// the correct configuration bits as wells use the correct |
// initialization functions for the board. These defitions are only |
// required in the stack provided demos. They are not required in |
// final application design. |
#define DEMO_BOARD PIC18F87J50_PIM |
#define PIC18F87J50_PIM |
#define CLOCK_FREQ 48000000 |
#define GetSystemClock() CLOCK_FREQ |
#define GetInstructionClock() CLOCK_FREQ |
/** LED ************************************************************/ |
#define mInitAllLEDs() {LATE &= 0xFC; TRISE &= 0xFC; LATD &= 0xF3; TRISD &= 0xF3;} |
#define mLED_1 LATEbits.LATE0 |
#define mLED_2 LATEbits.LATE1 |
#define mLED_3 LATDbits.LATD2 |
#define mLED_4 LATDbits.LATD3 |
#define mGetLED_1() mLED_1 |
#define mGetLED_2() mLED_2 |
#define mGetLED_3() mLED_3 |
#define mGetLED_4() mLED_4 |
#define mLED_1_On() mLED_1 = 1; |
#define mLED_2_On() mLED_2 = 1; |
#define mLED_3_On() mLED_3 = 1; |
#define mLED_4_On() mLED_4 = 1; |
#define mLED_1_Off() mLED_1 = 0; |
#define mLED_2_Off() mLED_2 = 0; |
#define mLED_3_Off() mLED_3 = 0; |
#define mLED_4_Off() mLED_4 = 0; |
#define mLED_1_Toggle() mLED_1 = !mLED_1; |
#define mLED_2_Toggle() mLED_2 = !mLED_2; |
#define mLED_3_Toggle() mLED_3 = !mLED_3; |
#define mLED_4_Toggle() mLED_4 = !mLED_4; |
/** SWITCH *********************************************************/ |
#define mInitAllSwitches() TRISBbits.TRISB4=1; |
#define mInitSwitch2() TRISBbits.TRISB4=1; |
#define mInitSwitch3() TRISBbits.TRISB4=1; |
#define sw2 PORTBbits.RB4 |
#define sw3 PORTBbits.RB4 |
/** POT ************************************************************/ |
#define mInitPOT() {TRISAbits.TRISA0=1; \ |
WDTCONbits.ADSHR = 1; \ |
ANCON0bits.PCFG0 = 1; \ |
WDTCONbits.ADSHR = 0; \ |
ADCON0=0x01; \ |
ADCON1=0xBE;} // POT on HPC Explorer |
/** I 2 C T E M P S E N S E *************************************/ |
#define mInitI2CPins() TRISC |= 0x18; // RC3 and RC4 are I2C |
#endif //HARDWARE_PROFILE_PIC18F87J50_PIM_H |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/HardwareProfile - PIC24F Starter Kit.h |
---|
0,0 → 1,129 |
/******************************************************************** |
FileName: HardwareProfile - PIC24F Starter Kit.h |
Dependencies: See INCLUDES section |
Processor: PIC24FJ256GB106 |
Hardware: PIC24F Starter Kit |
Compiler: Microchip C30 |
Company: Microchip Technology, Inc. |
Software License Agreement: |
The software supplied herewith by Microchip Technology Incorporated |
(the Company) for its PIC® Microcontroller is intended and |
supplied to you, the Companys customer, for use solely and |
exclusively on Microchip PIC Microcontroller products. The |
software is owned by the Company and/or its supplier, and is |
protected under applicable copyright laws. All rights are reserved. |
Any use in violation of the foregoing restrictions may subject the |
user to criminal sanctions under applicable laws, as well as to |
civil liability for the breach of the terms and conditions of this |
license. |
THIS SOFTWARE IS PROVIDED IN AN AS IS CONDITION. NO WARRANTIES, |
WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED |
TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, |
IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR |
CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
******************************************************************** |
File Description: |
Change History: |
Rev Date Description |
1.0 11/19/2004 Initial release |
2.1 02/26/2007 Updated for simplicity and to use common |
coding style |
2.3 09/15/2008 Broke out each hardware platform into its own |
"HardwareProfile - xxx.h" file |
********************************************************************/ |
#ifndef HARDWARE_PROFILE_PIC24F_STARTER_KIT_H |
#define HARDWARE_PROFILE_PIC24F_STARTER_KIT_H |
/*******************************************************************/ |
/******** USB stack hardware selection options *********************/ |
/*******************************************************************/ |
//This section is the set of definitions required by the MCHPFSUSB |
// framework. These definitions tell the firmware what mode it is |
// running in, and where it can find the results to some information |
// that the stack needs. |
//These definitions are required by every application developed with |
// this revision of the MCHPFSUSB framework. Please review each |
// option carefully and determine which options are desired/required |
// for your application. |
//#define USE_SELF_POWER_SENSE_IO |
#define tris_self_power TRISAbits.TRISA2 // Input |
#define self_power 1 |
//#define USE_USB_BUS_SENSE_IO |
#define tris_usb_bus_sense U1OTGSTATbits.SESVD //TRISBbits.TRISB5 // Input |
#define USB_BUS_SENSE U1OTGSTATbits.SESVD |
//Uncomment this to make the output HEX of this project |
// to be able to be bootloaded using the HID bootloader |
#define PROGRAMMABLE_WITH_USB_HID_BOOTLOADER |
//If the application is going to be used with the HID bootloader |
// then this will provide a function for the application to |
// enter the bootloader from the application (optional) |
#if defined(PROGRAMMABLE_WITH_USB_HID_BOOTLOADER) |
#define EnterBootloader() __asm__("goto 0x400") |
#endif |
/*******************************************************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/******** Application specific definitions *************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/** Board definition ***********************************************/ |
//These defintions will tell the main() function which board is |
// currently selected. This will allow the application to add |
// the correct configuration bits as wells use the correct |
// initialization functions for the board. These defitions are only |
// required in the stack provided demos. They are not required in |
// final application design. |
#define DEMO_BOARD PIC24F_STARTER_KIT |
#define PIC24F_STARTER_KIT |
#define CLOCK_FREQ 32000000 |
/** LED ************************************************************/ |
#define mInitAllLEDs() LATG &= 0xFE1F; TRISG &= 0xFE1F; LATF &= 0xFFCF; TRISF &= 0xFFCF; //G6,7,8,9 and F4,5 |
#define mGetLED_1() (TRISG & ~0x0180?1:0) |
#define mGetLED_2() (TRISG & ~0x0060?1:0) |
#define mGetLED_3() (TRISF & ~0x0030?1:0) |
#define mGetLED_4() |
#define mLED_1_On() TRISG |= 0x0180; |
#define mLED_2_On() TRISG |= 0x0060; |
#define mLED_3_On() TRISF |= 0x0030; |
#define mLED_4_On() |
#define mLED_1_Off() TRISG &= ~0x0180; |
#define mLED_2_Off() TRISG &= ~0x0060; |
#define mLED_3_Off() TRISF &= ~0x0030; |
#define mLED_4_Off() |
#define mLED_1_Toggle() TRISG ^= 0x0180; |
#define mLED_2_Toggle() TRISG ^= 0x0060; |
#define mLED_3_Toggle() TRISF ^= 0x0030; |
#define mLED_4_Toggle() |
/** SWITCH *********************************************************/ |
#define mInitSwitch2() TRISDbits.TRISD6=1; |
#define mInitSwitch3() TRISDbits.TRISD7=1; |
#define mInitAllSwitches() mInitSwitch2();mInitSwitch3(); |
#define sw2 PORTDbits.RD6 |
#define sw3 PORTDbits.RD7 |
/** POT ************************************************************/ |
#define mInitPOT() {AD1PCFGLbits.PCFG0 = 0; AD1CON2bits.VCFG = 0x0; AD1CON3bits.ADCS = 0xFF; AD1CON1bits.SSRC = 0x0; AD1CON3bits.SAMC = 0b00001; AD1CON1bits.FORM = 0b00; AD1CON2bits.SMPI = 0x0; AD1CON1bits.ADON = 1;} |
#endif //HARDWARE_PROFILE_PIC24F_STARTER_KIT_H |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/HardwareProfile - PIC24FJ256GB110 PIM.h |
---|
0,0 → 1,136 |
/******************************************************************** |
FileName: HardwareProfile - PIC24FJ256GB110 PIM.h |
Dependencies: See INCLUDES section |
Processor: PIC24FJ256GB110 |
Hardware: PIC24FJ256GB110 PIM |
Compiler: Microchip C30 |
Company: Microchip Technology, Inc. |
Software License Agreement: |
The software supplied herewith by Microchip Technology Incorporated |
(the Company) for its PIC® Microcontroller is intended and |
supplied to you, the Companys customer, for use solely and |
exclusively on Microchip PIC Microcontroller products. The |
software is owned by the Company and/or its supplier, and is |
protected under applicable copyright laws. All rights are reserved. |
Any use in violation of the foregoing restrictions may subject the |
user to criminal sanctions under applicable laws, as well as to |
civil liability for the breach of the terms and conditions of this |
license. |
THIS SOFTWARE IS PROVIDED IN AN AS IS CONDITION. NO WARRANTIES, |
WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED |
TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, |
IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR |
CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
******************************************************************** |
File Description: |
Change History: |
Rev Date Description |
1.0 11/19/2004 Initial release |
2.1 02/26/2007 Updated for simplicity and to use common |
coding style |
2.3 09/15/2008 Broke out each hardware platform into its own |
"HardwareProfile - xxx.h" file |
********************************************************************/ |
#ifndef HARDWARE_PROFILE_PIC24FJ256GB110_PIM_H |
#define HARDWARE_PROFILE_PIC24FJ256GB110_PIM_H |
/*******************************************************************/ |
/******** USB stack hardware selection options *********************/ |
/*******************************************************************/ |
//This section is the set of definitions required by the MCHPFSUSB |
// framework. These definitions tell the firmware what mode it is |
// running in, and where it can find the results to some information |
// that the stack needs. |
//These definitions are required by every application developed with |
// this revision of the MCHPFSUSB framework. Please review each |
// option carefully and determine which options are desired/required |
// for your application. |
//#define USE_SELF_POWER_SENSE_IO |
#define tris_self_power TRISAbits.TRISA2 // Input |
#define self_power 1 |
//#define USE_USB_BUS_SENSE_IO |
#define tris_usb_bus_sense TRISBbits.TRISB5 // Input |
#define USB_BUS_SENSE 1 |
//Uncomment this to make the output HEX of this project |
// to be able to be bootloaded using the HID bootloader |
#define PROGRAMMABLE_WITH_USB_HID_BOOTLOADER |
//If the application is going to be used with the HID bootloader |
// then this will provide a function for the application to |
// enter the bootloader from the application (optional) |
#if defined(PROGRAMMABLE_WITH_USB_HID_BOOTLOADER) |
#define EnterBootloader() __asm__("goto 0x400") |
#endif |
/*******************************************************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/******** Application specific definitions *************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/** Board definition ***********************************************/ |
//These defintions will tell the main() function which board is |
// currently selected. This will allow the application to add |
// the correct configuration bits as wells use the correct |
// initialization functions for the board. These defitions are only |
// required in the stack provided demos. They are not required in |
// final application design. |
#define DEMO_BOARD PIC24FJ256GB110_PIM |
#define EXPLORER_16 |
#define PIC24FJ256GB110_PIM |
#define CLOCK_FREQ 32000000 |
#define GetSystemClock() CLOCK_FREQ |
#define GetInstructionClock() GetSystemClock() |
/** LED ************************************************************/ |
#define mInitAllLEDs() LATA &= 0xF0; TRISA &= 0xF0; |
#define mLED_1 LATAbits.LATA0 |
#define mLED_2 LATAbits.LATA1 |
#define mLED_3 LATAbits.LATA2 |
#define mLED_4 LATAbits.LATA3 |
#define mGetLED_1() mLED_1 |
#define mGetLED_2() mLED_2 |
#define mGetLED_3() mLED_3 |
#define mGetLED_4() mLED_4 |
#define mLED_1_On() mLED_1 = 1; |
#define mLED_2_On() mLED_2 = 1; |
#define mLED_3_On() mLED_3 = 1; |
#define mLED_4_On() mLED_4 = 1; |
#define mLED_1_Off() mLED_1 = 0; |
#define mLED_2_Off() mLED_2 = 0; |
#define mLED_3_Off() mLED_3 = 0; |
#define mLED_4_Off() mLED_4 = 0; |
#define mLED_1_Toggle() mLED_1 = !mLED_1; |
#define mLED_2_Toggle() mLED_2 = !mLED_2; |
#define mLED_3_Toggle() mLED_3 = !mLED_3; |
#define mLED_4_Toggle() mLED_4 = !mLED_4; |
/** SWITCH *********************************************************/ |
#define mInitSwitch2() TRISDbits.TRISD6=1; |
#define mInitSwitch3() TRISDbits.TRISD7=1; |
#define mInitAllSwitches() mInitSwitch2();mInitSwitch3(); |
#define sw2 PORTDbits.RD6 |
#define sw3 PORTDbits.RD7 |
/** POT ************************************************************/ |
#define mInitPOT() {AD1PCFGLbits.PCFG5 = 0; AD1CON2bits.VCFG = 0x0; AD1CON3bits.ADCS = 0xFF; AD1CON1bits.SSRC = 0x0; AD1CON3bits.SAMC = 0b10000; AD1CON1bits.FORM = 0b00; AD1CON2bits.SMPI = 0x0; AD1CON1bits.ADON = 1;} |
#endif //HARDWARE_PROFILE_PIC24FJ256GB110_PIM_H |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/HardwareProfile - PIC32MX460F512L PIM.h |
---|
0,0 → 1,121 |
/******************************************************************** |
FileName: HardwareProfile - PIC32MX460F512L PIM.h |
Dependencies: See INCLUDES section |
Processor: PIC32 USB Microcontrollers |
Hardware: PIC32MX460F512L PIM |
Compiler: Microchip C32 (for PIC32) |
Company: Microchip Technology, Inc. |
Software License Agreement: |
The software supplied herewith by Microchip Technology Incorporated |
(the Company) for its PIC® Microcontroller is intended and |
supplied to you, the Companys customer, for use solely and |
exclusively on Microchip PIC Microcontroller products. The |
software is owned by the Company and/or its supplier, and is |
protected under applicable copyright laws. All rights are reserved. |
Any use in violation of the foregoing restrictions may subject the |
user to criminal sanctions under applicable laws, as well as to |
civil liability for the breach of the terms and conditions of this |
license. |
THIS SOFTWARE IS PROVIDED IN AN AS IS CONDITION. NO WARRANTIES, |
WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED |
TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, |
IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR |
CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
******************************************************************** |
File Description: |
Change History: |
Rev Date Description |
1.0 11/19/2004 Initial release |
2.1 02/26/2007 Updated for simplicity and to use common |
coding style |
2.3 09/15/2008 Broke out each hardware platform into its own |
"HardwareProfile - xxx.h" file |
********************************************************************/ |
#ifndef HARDWARE_PROFILE_PIC32MX460F512L_PIM_H |
#define HARDWARE_PROFILE_PIC32MX460F512L_PIM_H |
/*******************************************************************/ |
/******** USB stack hardware selection options *********************/ |
/*******************************************************************/ |
//This section is the set of definitions required by the MCHPFSUSB |
// framework. These definitions tell the firmware what mode it is |
// running in, and where it can find the results to some information |
// that the stack needs. |
//These definitions are required by every application developed with |
// this revision of the MCHPFSUSB framework. Please review each |
// option carefully and determine which options are desired/required |
// for your application. |
//#define USE_SELF_POWER_SENSE_IO |
#define tris_self_power TRISAbits.TRISA2 // Input |
#define self_power 1 |
//#define USE_USB_BUS_SENSE_IO |
#define tris_usb_bus_sense TRISBbits.TRISB5 // Input |
#define USB_BUS_SENSE 1 |
/*******************************************************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/******** Application specific definitions *************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/** Board definition ***********************************************/ |
//These defintions will tell the main() function which board is |
// currently selected. This will allow the application to add |
// the correct configuration bits as wells use the correct |
// initialization functions for the board. These defitions are only |
// required in the stack provided demos. They are not required in |
// final application design. |
#define DEMO_BOARD PIC32MX460F512L_PIM |
#define EXPLORER_16 |
#define PIC32MX460F512L_PIM |
/** LED ************************************************************/ |
#define mInitAllLEDs() LATA &= 0xFF03; TRISA &= 0xFF03; |
#define mLED_1 LATAbits.LATA2 |
#define mLED_2 LATAbits.LATA3 |
#define mLED_3 LATAbits.LATA6 |
#define mLED_4 LATAbits.LATA7 |
#define mGetLED_1() mLED_1 |
#define mGetLED_2() mLED_2 |
#define mGetLED_3() mLED_3 |
#define mGetLED_4() mLED_4 |
#define mLED_1_On() mLED_1 = 1; |
#define mLED_2_On() mLED_2 = 1; |
#define mLED_3_On() mLED_3 = 1; |
#define mLED_4_On() mLED_4 = 1; |
#define mLED_1_Off() mLED_1 = 0; |
#define mLED_2_Off() mLED_2 = 0; |
#define mLED_3_Off() mLED_3 = 0; |
#define mLED_4_Off() mLED_4 = 0; |
#define mLED_1_Toggle() mLED_1 = !mLED_1; |
#define mLED_2_Toggle() mLED_2 = !mLED_2; |
#define mLED_3_Toggle() mLED_3 = !mLED_3; |
#define mLED_4_Toggle() mLED_4 = !mLED_4; |
/** SWITCH *********************************************************/ |
#define mInitSwitch2() TRISDbits.TRISD6=1; |
#define mInitSwitch3() TRISDbits.TRISD7=1; |
#define mInitAllSwitches() mInitSwitch2();mInitSwitch3(); |
#define sw2 PORTDbits.RD6 |
#define sw3 PORTDbits.RD7 |
/** POT ************************************************************/ |
#define mInitPOT() {AD1PCFGbits.PCFG5 = 0; AD1CON2bits.VCFG = 0x0; AD1CON3bits.ADCS = 0xFF; AD1CON1bits.SSRC = 0x0; AD1CON3bits.SAMC = 0x10; AD1CON1bits.FORM = 0x0; AD1CON2bits.SMPI = 0x0; AD1CON1bits.ADON = 1;} |
#endif //HARDWARE_PROFILE_PIC32MX460F512L_PIM_H |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/HardwareProfile - PICDEM FSUSB.bak |
---|
0,0 → 1,207 |
/******************************************************************** |
FileName: HardwareProfile - PICDEM FSUSB.h |
Dependencies: See INCLUDES section |
Processor: PIC18 USB Microcontrollers |
Hardware: PICDEM FSUSB |
Compiler: Microchip C18 |
Company: Microchip Technology, Inc. |
Software License Agreement: |
The software supplied herewith by Microchip Technology Incorporated |
(the Company) for its PIC® Microcontroller is intended and |
supplied to you, the Companys customer, for use solely and |
exclusively on Microchip PIC Microcontroller products. The |
software is owned by the Company and/or its supplier, and is |
protected under applicable copyright laws. All rights are reserved. |
Any use in violation of the foregoing restrictions may subject the |
user to criminal sanctions under applicable laws, as well as to |
civil liability for the breach of the terms and conditions of this |
license. |
THIS SOFTWARE IS PROVIDED IN AN AS IS CONDITION. NO WARRANTIES, |
WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED |
TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, |
IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR |
CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
******************************************************************** |
File Description: |
Change History: |
Rev Date Description |
1.0 11/19/2004 Initial release |
2.1 02/26/2007 Updated for simplicity and to use common |
coding style |
2.3 09/15/2008 Broke out each hardware platform into its own |
"HardwareProfile - xxx.h" file |
********************************************************************/ |
#ifndef HARDWARE_PROFILE_PICDEM_FSUSB_H |
#define HARDWARE_PROFILE_PICDEM_FSUSB_H |
/*******************************************************************/ |
/******** USB stack hardware selection options *********************/ |
/*******************************************************************/ |
//This section is the set of definitions required by the MCHPFSUSB |
// framework. These definitions tell the firmware what mode it is |
// running in, and where it can find the results to some information |
// that the stack needs. |
//These definitions are required by every application developed with |
// this revision of the MCHPFSUSB framework. Please review each |
// option carefully and determine which options are desired/required |
// for your application. |
//The PICDEM FS USB Demo Board platform supports the USE_SELF_POWER_SENSE_IO |
//and USE_USB_BUS_SENSE_IO features. Uncomment the below line(s) if |
//it is desireable to use one or both of the features. |
//#define USE_SELF_POWER_SENSE_IO |
#define tris_self_power TRISAbits.TRISA2 // Input |
#if defined(USE_SELF_POWER_SENSE_IO) |
#define self_power PORTAbits.RA2 |
#else |
#define self_power 1 |
#endif |
//#define USE_USB_BUS_SENSE_IO |
#define tris_usb_bus_sense TRISAbits.TRISA1 // Input |
#if defined(USE_USB_BUS_SENSE_IO) |
#define USB_BUS_SENSE PORTAbits.RA1 |
#else |
#define USB_BUS_SENSE 1 |
#endif |
//Uncomment the following line to make the output HEX of this |
// project work with the MCHPUSB Bootloader |
//#define PROGRAMMABLE_WITH_USB_MCHPUSB_BOOTLOADER |
//Uncomment the following line to make the output HEX of this |
// project work with the HID Bootloader |
#define PROGRAMMABLE_WITH_USB_HID_BOOTLOADER |
/*******************************************************************/ |
/******** MDD File System selection options ************************/ |
/*******************************************************************/ |
#define USE_PIC18 |
#define ERASE_BLOCK_SIZE 64 |
#define WRITE_BLOCK_SIZE 32 |
/*******************************************************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/******** Application specific definitions *************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/** Board definition ***********************************************/ |
//These defintions will tell the main() function which board is |
// currently selected. This will allow the application to add |
// the correct configuration bits as wells use the correct |
// initialization functions for the board. These defitions are only |
// required in the stack provided demos. They are not required in |
// final application design. |
#define DEMO_BOARD PICDEM_FS_USB |
#define PICDEM_FS_USB |
#define CLOCK_FREQ 48000000 |
/** LED ************************************************************/ |
#define mInitAllLEDs() LATD &= 0xF0; TRISD &= 0xF0; |
#define mLED_1 LATDbits.LATD0 |
#define mLED_2 LATDbits.LATD1 |
#define mLED_3 LATDbits.LATD2 |
#define mLED_4 LATDbits.LATD3 |
#define mGetLED_1() mLED_1 |
#define mGetLED_2() mLED_2 |
#define mGetLED_3() mLED_3 |
#define mGetLED_4() mLED_4 |
#define mLED_1_On() mLED_1 = 1; |
#define mLED_2_On() mLED_2 = 1; |
#define mLED_3_On() mLED_3 = 1; |
#define mLED_4_On() mLED_4 = 1; |
#define mLED_1_Off() mLED_1 = 0; |
#define mLED_2_Off() mLED_2 = 0; |
#define mLED_3_Off() mLED_3 = 0; |
#define mLED_4_Off() mLED_4 = 0; |
#define mLED_1_Toggle() mLED_1 = !mLED_1; |
#define mLED_2_Toggle() mLED_2 = !mLED_2; |
#define mLED_3_Toggle() mLED_3 = !mLED_3; |
#define mLED_4_Toggle() mLED_4 = !mLED_4; |
/** SWITCH *********************************************************/ |
#define mInitAllSwitches() TRISBbits.TRISB4=1;TRISBbits.TRISB5=1; |
#define mInitSwitch2() TRISBbits.TRISB4=1; |
#define mInitSwitch3() TRISBbits.TRISB5=1; |
#define sw2 PORTBbits.RB4 |
#define sw3 PORTBbits.RB5 |
/** POT ************************************************************/ |
#define mInitPOT() {TRISAbits.TRISA0=1;ADCON0=0x01;ADCON2=0x3C;ADCON2bits.ADFM = 1;} |
/** SPI : Chip Select Lines ****************************************/ |
#define tris_cs_temp_sensor TRISBbits.TRISB2 // Output |
#define cs_temp_sensor LATBbits.LATB2 |
/** USB external transceiver interface (optional) ******************/ |
#define tris_usb_vpo TRISBbits.TRISB3 // Output |
#define tris_usb_vmo TRISBbits.TRISB2 // Output |
#define tris_usb_rcv TRISAbits.TRISA4 // Input |
#define tris_usb_vp TRISCbits.TRISC5 // Input |
#define tris_usb_vm TRISCbits.TRISC4 // Input |
#define tris_usb_oe TRISCbits.TRISC1 // Output |
#define tris_usb_suspnd TRISAbits.TRISA3 // Output |
/** TRIS ***********************************************************/ |
#define INPUT_PIN 1 |
#define OUTPUT_PIN 0 |
#if defined(YAS) |
#define RXTX LATBbits.LATB5 |
#else |
#define RXTX LATAbits.LATA2 |
#endif |
#define BPF_S0 LATAbits.LATA0 |
#define BPF_S1 LATAbits.LATA1 |
#if defined(YAS) |
#define BPF_S2 LATAbits.LATA2 |
#endif |
#define BPF_S0_STATE PORTAbits.RA0 |
#define BPF_S1_STATE PORTAbits.RA1 |
#if defined(YAS) |
#define BPF_S2_STATE PORTAbits.RA2 |
#endif |
#define LPF_0 LATAbits.LATA3 |
#define LPF_1 LATAbits.LATA4 |
#define LPF_2 LATAbits.LATA5 |
#if defined(YAS) |
#else |
#define LPF_3 LATBbits.LATB2 |
#define LPF_4 LATBbits.LATB3 |
#define LPF_5 LATBbits.LATB4 |
#define LPF_6 LATBbits.LATB5 |
#endif |
/** S W I T C H *****************************************************/ |
#define mInitSwitch() TRISCbits.TRISC2 = 1; |
#define UserSW PORTCbits.RC2 |
#define mLED_Both_Off() {mLED_1_Off(); mLED_2_Off();} |
#define mLED_Both_On() {mLED_1_On(); mLED_2_On();} |
#define mLED_Only_1_On() {mLED_1_On(); mLED_2_Off();} |
#define mLED_Only_2_On() {mLED_1_Off(); mLED_2_On();} |
#endif //HARDWARE_PROFILE_PICDEM_FSUSB_H |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/HardwareProfile - PICDEM FSUSB.h |
---|
0,0 → 1,210 |
/******************************************************************** |
FileName: HardwareProfile - PICDEM FSUSB.h |
Dependencies: See INCLUDES section |
Processor: PIC18 USB Microcontrollers |
Hardware: PICDEM FSUSB |
Compiler: Microchip C18 |
Company: Microchip Technology, Inc. |
Software License Agreement: |
The software supplied herewith by Microchip Technology Incorporated |
(the Company) for its PIC® Microcontroller is intended and |
supplied to you, the Companys customer, for use solely and |
exclusively on Microchip PIC Microcontroller products. The |
software is owned by the Company and/or its supplier, and is |
protected under applicable copyright laws. All rights are reserved. |
Any use in violation of the foregoing restrictions may subject the |
user to criminal sanctions under applicable laws, as well as to |
civil liability for the breach of the terms and conditions of this |
license. |
THIS SOFTWARE IS PROVIDED IN AN AS IS CONDITION. NO WARRANTIES, |
WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED |
TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, |
IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR |
CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
******************************************************************** |
File Description: |
Change History: |
Rev Date Description |
1.0 11/19/2004 Initial release |
2.1 02/26/2007 Updated for simplicity and to use common |
coding style |
2.3 09/15/2008 Broke out each hardware platform into its own |
"HardwareProfile - xxx.h" file |
********************************************************************/ |
#ifndef HARDWARE_PROFILE_PICDEM_FSUSB_H |
#define HARDWARE_PROFILE_PICDEM_FSUSB_H |
/*******************************************************************/ |
/******** USB stack hardware selection options *********************/ |
/*******************************************************************/ |
//This section is the set of definitions required by the MCHPFSUSB |
// framework. These definitions tell the firmware what mode it is |
// running in, and where it can find the results to some information |
// that the stack needs. |
//These definitions are required by every application developed with |
// this revision of the MCHPFSUSB framework. Please review each |
// option carefully and determine which options are desired/required |
// for your application. |
//The PICDEM FS USB Demo Board platform supports the USE_SELF_POWER_SENSE_IO |
//and USE_USB_BUS_SENSE_IO features. Uncomment the below line(s) if |
//it is desireable to use one or both of the features. |
//#define USE_SELF_POWER_SENSE_IO |
#define tris_self_power TRISAbits.TRISA2 // Input |
#if defined(USE_SELF_POWER_SENSE_IO) |
#define self_power PORTAbits.RA2 |
#else |
#define self_power 1 |
#endif |
//#define USE_USB_BUS_SENSE_IO |
#define tris_usb_bus_sense TRISAbits.TRISA1 // Input |
#if defined(USE_USB_BUS_SENSE_IO) |
#define USB_BUS_SENSE PORTAbits.RA1 |
#else |
#define USB_BUS_SENSE 1 |
#endif |
//Uncomment the following line to make the output HEX of this |
// project work with the MCHPUSB Bootloader |
//#define PROGRAMMABLE_WITH_USB_MCHPUSB_BOOTLOADER |
//Uncomment the following line to make the output HEX of this |
// project work with the HID Bootloader |
#define PROGRAMMABLE_WITH_USB_HID_BOOTLOADER |
/*******************************************************************/ |
/******** MDD File System selection options ************************/ |
/*******************************************************************/ |
#define USE_PIC18 |
#define ERASE_BLOCK_SIZE 64 |
#define WRITE_BLOCK_SIZE 32 |
/*******************************************************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/******** Application specific definitions *************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/** Board definition ***********************************************/ |
//These defintions will tell the main() function which board is |
// currently selected. This will allow the application to add |
// the correct configuration bits as wells use the correct |
// initialization functions for the board. These defitions are only |
// required in the stack provided demos. They are not required in |
// final application design. |
#define DEMO_BOARD PICDEM_FS_USB |
#define PICDEM_FS_USB |
#define CLOCK_FREQ 48000000 |
/** LED ************************************************************/ |
#define mInitAllLEDs() LATD &= 0xF0; TRISD &= 0xF0; |
#define mLED_1 LATDbits.LATD0 |
#define mLED_2 LATDbits.LATD1 |
#define mLED_3 LATDbits.LATD2 |
#define mLED_4 LATDbits.LATD3 |
#define mGetLED_1() mLED_1 |
#define mGetLED_2() mLED_2 |
#define mGetLED_3() mLED_3 |
#define mGetLED_4() mLED_4 |
#define mLED_1_On() mLED_1 = 1; |
#define mLED_2_On() mLED_2 = 1; |
#define mLED_3_On() mLED_3 = 1; |
#define mLED_4_On() mLED_4 = 1; |
#define mLED_1_Off() mLED_1 = 0; |
#define mLED_2_Off() mLED_2 = 0; |
#define mLED_3_Off() mLED_3 = 0; |
#define mLED_4_Off() mLED_4 = 0; |
#define mLED_1_Toggle() mLED_1 = !mLED_1; |
#define mLED_2_Toggle() mLED_2 = !mLED_2; |
#define mLED_3_Toggle() mLED_3 = !mLED_3; |
#define mLED_4_Toggle() mLED_4 = !mLED_4; |
/** SWITCH *********************************************************/ |
#define mInitAllSwitches() TRISBbits.TRISB4=1;TRISBbits.TRISB5=1; |
#define mInitSwitch2() TRISBbits.TRISB4=1; |
#define mInitSwitch3() TRISBbits.TRISB5=1; |
#define sw2 PORTBbits.RB4 |
#define sw3 PORTBbits.RB5 |
/** POT ************************************************************/ |
#define mInitPOT() {TRISAbits.TRISA0=1;ADCON0=0x01;ADCON2=0x3C;ADCON2bits.ADFM = 1;} |
/** SPI : Chip Select Lines ****************************************/ |
#define tris_cs_temp_sensor TRISBbits.TRISB2 // Output |
#define cs_temp_sensor LATBbits.LATB2 |
/** USB external transceiver interface (optional) ******************/ |
#define tris_usb_vpo TRISBbits.TRISB3 // Output |
#define tris_usb_vmo TRISBbits.TRISB2 // Output |
#define tris_usb_rcv TRISAbits.TRISA4 // Input |
#define tris_usb_vp TRISCbits.TRISC5 // Input |
#define tris_usb_vm TRISCbits.TRISC4 // Input |
#define tris_usb_oe TRISCbits.TRISC1 // Output |
#define tris_usb_suspnd TRISAbits.TRISA3 // Output |
/** TRIS ***********************************************************/ |
#define INPUT_PIN 1 |
#define OUTPUT_PIN 0 |
#if defined(YAS) |
#define RXTX LATBbits.LATB5 |
#else |
#define RXTX LATAbits.LATA2 |
#endif |
#define BPF_S0 LATAbits.LATA0 |
#define BPF_S1 LATAbits.LATA1 |
#if defined(YAS) |
#define BPF_S2 LATAbits.LATA2 |
#endif |
#define BPF_S0_STATE PORTAbits.RA0 |
#define BPF_S1_STATE PORTAbits.RA1 |
#if defined(YAS) |
#define BPF_S2_STATE PORTAbits.RA2 |
#endif |
#define PADDLE_DIT PORTBbits.RB6 |
#define PADDLE_DAH PORTBbits.RB7 |
#define LPF_0 LATAbits.LATA3 |
#define LPF_1 LATAbits.LATA4 |
#define LPF_2 LATAbits.LATA5 |
#if defined(YAS) |
#else |
#define LPF_3 LATBbits.LATB2 |
#define LPF_4 LATBbits.LATB3 |
#define LPF_5 LATBbits.LATB4 |
#define LPF_6 LATBbits.LATB5 |
#endif |
/** S W I T C H *****************************************************/ |
#define mInitSwitch() TRISCbits.TRISC2 = 1; |
#define UserSW PORTCbits.RC2 |
#define mLED_Both_Off() {mLED_1_Off(); mLED_2_Off();} |
#define mLED_Both_On() {mLED_1_On(); mLED_2_On();} |
#define mLED_Only_1_On() {mLED_1_On(); mLED_2_Off();} |
#define mLED_Only_2_On() {mLED_1_Off(); mLED_2_On();} |
#endif //HARDWARE_PROFILE_PICDEM_FSUSB_H |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/HardwareProfile - UBW.h |
---|
0,0 → 1,182 |
/******************************************************************** |
FileName: HardwareProfile - UBW.h |
Dependencies: See INCLUDES section |
Processor: PIC18 USB Microcontrollers |
Hardware: PICDEM FSUSB |
Compiler: Microchip C18 |
Company: Microchip Technology, Inc. |
Software License Agreement: |
The software supplied herewith by Microchip Technology Incorporated |
(the Company) for its PIC® Microcontroller is intended and |
supplied to you, the Companys customer, for use solely and |
exclusively on Microchip PIC Microcontroller products. The |
software is owned by the Company and/or its supplier, and is |
protected under applicable copyright laws. All rights are reserved. |
Any use in violation of the foregoing restrictions may subject the |
user to criminal sanctions under applicable laws, as well as to |
civil liability for the breach of the terms and conditions of this |
license. |
THIS SOFTWARE IS PROVIDED IN AN AS IS CONDITION. NO WARRANTIES, |
WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED |
TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, |
IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR |
CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
******************************************************************** |
File Description: |
Change History: |
Rev Date Description |
1.0 11/19/2004 Initial release |
2.1 02/26/2007 Updated for simplicity and to use common |
coding style |
2.3 09/15/2008 Broke out each hardware platform into its own |
"HardwareProfile - xxx.h" file |
01/15/2009 UBW support |
********************************************************************/ |
#ifndef HARDWARE_PROFILE_UBW_H |
#define HARDWARE_PROFILE_UBW_H |
/*******************************************************************/ |
/******** USB stack hardware selection options *********************/ |
/*******************************************************************/ |
//This section is the set of definitions required by the MCHPFSUSB |
// framework. These definitions tell the firmware what mode it is |
// running in, and where it can find the results to some information |
// that the stack needs. |
//These definitions are required by every application developed with |
// this revision of the MCHPFSUSB framework. Please review each |
// option carefully and determine which options are desired/required |
// for your application. |
//The PICDEM FS USB Demo Board platform supports the USE_SELF_POWER_SENSE_IO |
//and USE_USB_BUS_SENSE_IO features. Uncomment the below line(s) if |
//it is desireable to use one or both of the features. |
//#define USE_SELF_POWER_SENSE_IO |
#define tris_self_power TRISAbits.TRISA2 // Input |
#if defined(USE_SELF_POWER_SENSE_IO) |
#define self_power PORTAbits.RA2 |
#else |
#define self_power 1 |
#endif |
//#define USE_USB_BUS_SENSE_IO |
#define tris_usb_bus_sense TRISAbits.TRISA1 // Input |
#if defined(USE_USB_BUS_SENSE_IO) |
#define USB_BUS_SENSE PORTAbits.RA1 |
#else |
#define USB_BUS_SENSE 1 |
#endif |
//Uncomment the following line to make the output HEX of this |
// project work with the MCHPUSB Bootloader |
#define PROGRAMMABLE_WITH_USB_MCHPUSB_BOOTLOADER |
//Uncomment the following line to make the output HEX of this |
// project work with the HID Bootloader |
//#define PROGRAMMABLE_WITH_USB_HID_BOOTLOADER |
/*******************************************************************/ |
/******** MDD File System selection options ************************/ |
/*******************************************************************/ |
#define USE_PIC18 |
#define ERASE_BLOCK_SIZE 64 |
#define WRITE_BLOCK_SIZE 32 |
/*******************************************************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/******** Application specific definitions *************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/** Board definition ***********************************************/ |
//These defintions will tell the main() function which board is |
// currently selected. This will allow the application to add |
// the correct configuration bits as wells use the correct |
// initialization functions for the board. These defitions are only |
// required in the stack provided demos. They are not required in |
// final application design. |
#define DEMO_BOARD UBW |
#define UBW |
#define CLOCK_FREQ 48000000 |
// Special UBW emu board by YAS |
// #define YAS |
/** LED ************************************************************/ |
/* On UBW, LED1 = RC0, LED2 = RC1, SW = RC2 */ |
#define mInitAllLEDs() LATC &= 0xFC; TRISC &= 0xFC; |
#define mLED_1 LATCbits.LATC0 |
#define mLED_2 LATCbits.LATC1 |
#define mLED_1_On() mLED_1 = 1; |
#define mLED_2_On() mLED_2 = 1; |
#define mLED_1_Off() mLED_1 = 0; |
#define mLED_2_Off() mLED_2 = 0; |
#define mLED_1_Toggle() mLED_1 = !mLED_1; |
#define mLED_2_Toggle() mLED_2 = !mLED_2; |
#if defined(YAS) |
#define RXTX LATBbits.LATB5 |
#else |
#define RXTX LATAbits.LATA2 |
#endif |
#define BPF_S0 LATAbits.LATA0 |
#define BPF_S1 LATAbits.LATA1 |
#if defined(YAS) |
#define BPF_S2 LATAbits.LATA2 |
#endif |
#define BPF_S0_STATE PORTAbits.RA0 |
#define BPF_S1_STATE PORTAbits.RA1 |
#if defined(YAS) |
#define BPF_S2_STATE PORTAbits.RA2 |
#endif |
#define PADDLE_DIT PORTBbits.RB6 |
#define PADDLE_DAH PORTBbits.RB7 |
#define LPF_0 LATAbits.LATA3 |
#define LPF_1 LATAbits.LATA4 |
#define LPF_2 LATAbits.LATA5 |
#if defined(YAS) |
#else |
#define LPF_3 LATBbits.LATB2 |
#define LPF_4 LATBbits.LATB3 |
#define LPF_5 LATBbits.LATB4 |
#define LPF_6 LATBbits.LATB5 |
#endif |
/** S W I T C H *****************************************************/ |
#define mInitSwitch() TRISCbits.TRISC2 = 1; |
#define UserSW PORTCbits.RC2 |
#define mLED_Both_Off() {mLED_1_Off(); mLED_2_Off();} |
#define mLED_Both_On() {mLED_1_On(); mLED_2_On();} |
#define mLED_Only_1_On() {mLED_1_On(); mLED_2_Off();} |
#define mLED_Only_2_On() {mLED_1_Off(); mLED_2_On();} |
#endif //HARDWARE_PROFILE_UBW_H |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/HardwareProfile - UBW32.h |
---|
0,0 → 1,203 |
/******************************************************************** |
FileName: HardwareProfile - PIC32MX460F512L PIM.h |
Dependencies: See INCLUDES section |
Processor: PIC18 or PIC24 USB Microcontrollers |
Hardware: The code is natively intended to be used on the following |
hardware platforms: PICDEM FS USB Demo Board, |
PIC18F87J50 FS USB Plug-In Module, or |
Explorer 16 + PIC24 USB PIM. The firmware may be |
modified for use on other USB platforms by editing this |
file (HardwareProfile.h). |
Complier: Microchip C18 (for PIC18) or C30 (for PIC24) |
Company: Microchip Technology, Inc. |
Software License Agreement: |
The software supplied herewith by Microchip Technology Incorporated |
(the Company) for its PIC® Microcontroller is intended and |
supplied to you, the Companys customer, for use solely and |
exclusively on Microchip PIC Microcontroller products. The |
software is owned by the Company and/or its supplier, and is |
protected under applicable copyright laws. All rights are reserved. |
Any use in violation of the foregoing restrictions may subject the |
user to criminal sanctions under applicable laws, as well as to |
civil liability for the breach of the terms and conditions of this |
license. |
THIS SOFTWARE IS PROVIDED IN AN AS IS CONDITION. NO WARRANTIES, |
WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED |
TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, |
IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR |
CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
******************************************************************** |
File Description: |
Change History: |
Rev Date Description |
1.0 11/19/2004 Initial release |
2.1 02/26/2007 Updated for simplicity and to use common |
coding style |
********************************************************************/ |
#ifndef HARDWARE_PROFILE_UBW32_H |
#define HARDWARE_PROFILE_UBW32_H |
#include "Compiler.h" |
/*******************************************************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/******** Application specific definitions *************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/** Board definition ***********************************************/ |
//These defintions will tell the main() function which board is |
// currently selected. This will allow the application to add |
// the correct configuration bits as wells use the correct |
// initialization functions for the board. These defitions are only |
// required in the stack provided demos. They are not required in |
// final application design. |
/** CPU Clock Speed Assignment *************************************/ |
//#define RUN_AT_48MHZ |
//#define RUN_AT_24MHZ |
//#define RUN_AT_60MHZ |
#define RUN_AT_80MHZ |
// Various clock values |
#if defined(RUN_AT_48MHZ) |
#define GetSystemClock() 48000000UL |
#define GetPeripheralClock() 48000000UL |
#define GetInstructionClock() (GetSystemClock()) |
#elif defined(RUN_AT_24MHZ) |
#define GetSystemClock() 24000000UL |
#define GetPeripheralClock() 24000000UL |
#define GetInstructionClock() (GetSystemClock()) |
#elif defined(RUN_AT_60MHZ) |
#define GetSystemClock() (60000000ul) |
#define GetPeripheralClock() (GetSystemClock()) |
#define GetInstructionClock() (GetSystemClock()) |
#elif defined(RUN_AT_80MHZ) |
#define GetSystemClock() (80000000ul) |
#define GetPeripheralClock() (GetSystemClock()) |
#define GetInstructionClock() (GetSystemClock()) |
#else |
#error Choose a speed |
#endif |
#define PROGRAMMABLE_WITH_USB_HID_BOOTLOADER |
/*******************************************************************/ |
/******** USB stack hardware selection options *********************/ |
/*******************************************************************/ |
//This section is the set of definitions required by the MCHPFSUSB |
// framework. These definitions tell the firmware what mode it is |
// running in, and where it can find the results to some information |
// that the stack needs. |
//These definitions are required by every application developed with |
// this revision of the MCHPFSUSB framework. Please review each |
// option carefully and determine which options are desired/required |
// for your application. |
//#define USE_SELF_POWER_SENSE_IO |
#define tris_self_power TRISAbits.TRISA2 // Input |
#define self_power 1 |
//#define USE_USB_BUS_SENSE_IO |
#define tris_usb_bus_sense TRISBbits.TRISB5 // Input |
#define USB_BUS_SENSE 1 |
/*******************************************************************/ |
/******** Device revision workarounds ******************************/ |
/*******************************************************************/ |
//Uncomment this definition to allow for revision B3 silicon to work |
// with this firmware. |
#define PIC32MX460F512L_REV_B3_WORKAROUND |
/*******************************************************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/******** Application specific definitions *************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/*******************************************************************/ |
/** Board definition ***********************************************/ |
//These defintions will tell the main() function which board is |
// currently selected. This will allow the application to add |
// the correct configuration bits as wells use the correct |
// initialization functions for the board. These defitions are only |
// required in the stack provided demos. They are not required in |
// final application design. |
#define DEMO_BOARD UBW32 |
#define UBW32 |
/** LED ************************************************************/ |
#define mInitAllLEDs() LATE |= 0x000F; TRISE &= 0xFFF0; |
#define mLED_1 LATEbits.LATE3 |
#define mLED_2 LATEbits.LATE2 |
#define mLED_3 LATEbits.LATE1 |
#define mLED_4 LATEbits.LATE0 |
#define mGetLED_1() mLED_1 |
#define mGetLED_USB() mLED_1 |
#define mGetLED_2() mLED_2 |
#define mGetLED_3() mLED_3 |
#define mGetLED_4() mLED_4 |
#define mLED_1_On() mLED_1 = 0; |
#define mLED_USB_On() mLED_1 = 0; |
#define mLED_2_On() mLED_2 = 0; |
#define mLED_3_On() mLED_3 = 0; |
#define mLED_4_On() mLED_4 = 0; |
#define mLED_1_Off() mLED_1 = 1; |
#define mLED_USB_Off() mLED_1 = 1; |
#define mLED_2_Off() mLED_2 = 1; |
#define mLED_3_Off() mLED_3 = 1; |
#define mLED_4_Off() mLED_4 = 1; |
#define mLED_1_Toggle() mLED_1 = !mLED_1; |
#define mLED_USB_Toggle() mLED_1 = !mLED_1; |
#define mLED_2_Toggle() mLED_2 = !mLED_2; |
#define mLED_3_Toggle() mLED_3 = !mLED_3; |
#define mLED_4_Toggle() mLED_4 = !mLED_4; |
#define mLED_Both_Off() {mLED_1_Off(); mLED_2_Off();} |
/** SWITCH *********************************************************/ |
#define mInitSwitch2() TRISEbits.TRISE7=1; |
#define mInitSwitch3() TRISEbits.TRISE6=1; |
#define mInitAllSwitches() mInitSwitch2();mInitSwitch3(); |
#define swProgram PORTEbits.RE7 |
#define swUser PORTEbits.RE6 |
#define UserSW swUser |
#define sw2 swUser |
#define RXTX LATAbits.LATA2 |
#define BPF_S0 LATAbits.LATA0 |
#define BPF_S1 LATAbits.LATA1 |
#define BPF_S0_STATE PORTAbits.RA0 |
#define BPF_S1_STATE PORTAbits.RA1 |
#define PADDLE_DIT PORTFbits.RF4 |
#define PADDLE_DAH PORTFbits.RF5 |
#define LPF_0 LATAbits.LATA3 |
#define LPF_1 LATAbits.LATA4 |
#define LPF_2 LATAbits.LATA5 |
#define LPF_3 LATAbits.LATA6 |
#define LPF_4 LATAbits.LATA7 |
#define LPF_5 LATAbits.LATA9 |
#define LPF_6 LATAbits.LATA10 |
#endif |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/HardwareProfile.h |
---|
0,0 → 1,103 |
/******************************************************************** |
FileName: HardwareProfile.h |
Dependencies: See INCLUDES section |
Processor: PIC18, PIC24, or PIC32 USB Microcontrollers |
Hardware: The code is natively intended to be used on the |
following hardware platforms: |
PICDEM FS USB Demo Board |
PIC18F46J50 FS USB Plug-In Module |
PIC18F87J50 FS USB Plug-In Module |
Explorer 16 + PIC24 or PIC32 USB PIMs |
PIC24F Starter Kit |
Low Pin Count USB Development Kit |
The firmware may be modified for use on other USB |
platforms by editing this file (HardwareProfile.h) |
Compiler: Microchip C18 (for PIC18), C30 (for PIC24), |
or C32 (for PIC32) |
Company: Microchip Technology, Inc. |
Software License Agreement: |
The software supplied herewith by Microchip Technology Incorporated |
(the Company) for its PIC® Microcontroller is intended and |
supplied to you, the Companys customer, for use solely and |
exclusively on Microchip PIC Microcontroller products. The |
software is owned by the Company and/or its supplier, and is |
protected under applicable copyright laws. All rights are reserved. |
Any use in violation of the foregoing restrictions may subject the |
user to criminal sanctions under applicable laws, as well as to |
civil liability for the breach of the terms and conditions of this |
license. |
THIS SOFTWARE IS PROVIDED IN AN AS IS CONDITION. NO WARRANTIES, |
WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED |
TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, |
IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR |
CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
******************************************************************** |
File Description: |
Change History: |
Rev Date Description |
1.0 11/19/2004 Initial release |
2.1 02/26/2007 Updated for simplicity and to use common |
coding style |
2.3 09/15/2008 Broke out each hardware platform into its own |
"HardwareProfile - xxx.h" file |
********************************************************************/ |
#ifndef HARDWARE_PROFILE_H |
#define HARDWARE_PROFILE_H |
//#define DEMO_BOARD USER_DEFINED_BOARD |
#if !defined(DEMO_BOARD) |
#if defined(__C32__) |
#if defined(__32MX460F512L__) |
#if defined(PIC32MX460F512L_PIM) |
#include "HardwareProfile - PIC32MX460F512L PIM.h" |
#elif defined(PIC32_USB_STARTER_KIT) |
#include "HardwareProfile - PIC32 USB Starter Kit.h" |
#else |
#include "HardwareProfile - UBW32.h" |
#endif |
#elif defined(__32MX795F512L__) |
#if defined(PIC32MX795F512L_PIM) |
#include "HardwareProfile - PIC32MX795F512L PIM.h" |
#elif defined(PIC32_USB_STARTER_KIT) |
//PIC32 USB Starter Kit II |
#include "HardwareProfile - PIC32 USB Starter Kit.h" |
#endif |
#endif |
#endif |
#if defined(__C30__) |
#if defined(__PIC24FJ256GB110__) |
#include "HardwareProfile - PIC24FJ256GB110 PIM.h" |
#elif defined(__PIC24FJ256GB106__) |
#include "HardwareProfile - PIC24F Starter Kit.h" |
#endif |
#endif |
#if defined(__18CXX) |
#if defined(__18F4550) |
#include "HardwareProfile - PICDEM FSUSB.h" |
#elif defined(__18F87J50) |
#include "HardwareProfile - PIC18F87J50 PIM.h" |
#elif defined(__18F14K50) |
#include "HardwareProfile - Low Pin Count USB Development Kit.h" |
#elif defined(__18F46J50) |
#include "HardwareProfile - PIC18F46J50 PIM.h" |
#elif defined(__18F2550) |
#include "HardwareProfile - UBW.h" |
#endif |
#endif |
#endif |
#if !defined(DEMO_BOARD) |
#error "Demo board not defined. Either define DEMO_BOARD for a custom board or select the correct processor for the demo board." |
#endif |
#endif //HARDWARE_PROFILE_H |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/README.txt |
---|
0,0 → 1,260 |
News |
==== |
14 Apr 2009 |
The UBW has 1 power indicator LED, and 2 blinking LED's usually used to indicate the |
status of USB connections with the PC. |
Charles (and maybe some of you) finds the blinking LED's to be too bright and |
distracting. |
So I have implemented a toggle switch (the PRG button) function for you to turn |
the blinking on or off. |
Once turned on or off, the setting is stored in EEPROM, so it will continue to |
behave this way when you power off and next power on the UBW. |
The default setting is LED blinking ON. So when you (re)flash the firmware, the |
default is active. |
14 Mar 2009 |
I have just released the latest version of my UBW Emulator firmware. It now |
has (almost) all the functionalities of Fred (PE0FKO)'s v15.10 firmware for |
ATTINY45 and ATTINY85. All the functions are accessible with Winrad with Fred's |
ExtIO_Si570_v0.8.dll, including the wonderful option of setting of the |
filter crossover points from the software. The crossover points are stored |
in the UBW EEPROM so it will persist until changed again. Another new feature |
is the setting of floating point offset and multiplier in the firmware. This |
complements the setting of offset and (usually) integer multiplier in the PC |
SDR software. |
Winrad/ExtIO can be used to calibrate the UBW/Si570 (2 methods are available - |
calibrating the default freq, or against a known station freq, eg. WWV). |
Once calibrated, there is no need to calibrate other software - both set |
freq by value and set freq by register will give the correct calibrated |
freq now. In PowerSDR, leave the fxtal freq at the default 114.285 Mhz. |
The new UBW Emulator works perfectly with Rocky v3.6, PowerSDR-sr40, |
and PowerSDR-IQ. (set the Fxtal freq in the setup tab to the default 114.285 Mhz). |
With Fred's v15.10 firmware in the ATTINY, users can use the ATTINY based USB |
interfaces to do auto band switching of the mobo for Rx. To be able to do both Rx |
and Tx BPF switching, Rx/Tx switching (PTT), and external LPF switching, from a |
single USB connection, there are only 3 uC solutions that I know of: |
1. The UBW (or UBW32) with this UBW firmware |
2. Dave Brainerd's HSUSB, with firmware by Christos |
3. Arduino board (or clone), with PE0FKO firmware modified by Loftur TF3LJ. |
See Message #31623 |
UBW EMULATOR |
============ |
This is the UBW emulator firmware for emulating the AVR based |
DG8SAQ USB Si570 synthesiser, and Tony's USB-i2C Interface. |
It emulates most of the functions of the orginal DG8SAQ firmware. |
In addition, it emulates the new functions of the PE0FKO firmware (v15.10) |
by Fred, with smooth tune, calibration, setting of Auto BPF crossover |
points, setting of startup freq etc. After calibration of the UBW, |
both set freq by value (used by Rocky) and set freq by register (used by |
PowerSDR-sr40, with the fxtal freq set to the default 114.285 Mhz) will |
give the correct calibrated freq output from the Si570. No further |
calibration with the PC software is required. |
I would like to thank Joe Hopster who wrote the original UBW Si570 |
code, Tom DG8SAQ for the AVR synthesiser code, Mike Collins who has |
been invaluable in helping with the debugging and testing, John Fisher |
for the code example on Si570 slide, Edson for advice on BPF selection coding, |
bug fixing and testing, Fred for help to emulate his v15.7 firmware, |
and others who have contributed so much to Softrock and Si570. |
The emulator firmware HEX file is loaded in the UBW (either PIC |
18F2455, 18F2550 or 18F2553 version) by the Microchip USB bootloader. |
See UBW website for more details about the bootloader. |
Before starting the firmware (via the reset button, or on power up by |
plugging in the USB), the UBW should be connected via i2c interface to |
an Si570. Power up the Si570 before the UBW. |
There are several ways for connecting the UBW with the Si570. |
(1) Connection is with 4 wires, +5V, Gnd, SCL, SDA, to an i2c |
level converter, and then to Si570 with 4 wires, +3V3, Gnd, SCL, and |
SDA. If you use the WB6DHW Si570 board, it has the level converter built-in. So |
You can just connect the 4 wires to the header pins on the WB6DHW board. Note |
that the order of the 4 wires on the UBW is: GND, VCC, RB0, RB1. The order |
of the 4 header pins on WB6DHW board is: +5V, GND, SDA, SCL. |
(2) If you are not using an IC such as GTL2002 for +5V to +3V3 conversion, you |
can use discretes with the Philips (see AN97055 from Philips) |
i2c level converter circuit using 2 BS170's. |
(3) The UBW Emulator firmware sets up the SCL and SDA pins as open collector outputs. |
So you can just connect 3 wires from the UBW to the +3v3 Si570 on the Softrock: |
GND, SCL and SDA. The SCL and SDA lines will have pullup resistors to +3V3 on the |
Softrock pcb. This has been tested to work. HOwever, there is the risk that |
if the UBW firmware malfunctions for some reason (eg loading the wrong firmware instead |
of the Emulator firmware), the RB0 and RB1 (SDA and SCL) pins may go to output high of |
+5V, which may damage the Si570 or other +3V3 chips. |
The PC will detect the new USB device as a DG8SAQ-I2C device and as |
far as the PC is concerned, the UBW behaves almost exactly like the |
USB Si570 synthesiser (which is based on the AVR uController). When |
prompted by the PC to install the driver for this device, you install |
the AVR USB driver (from the USB Si570 synthesiser software download). |
You will also need the libusb0.dll and libusb0.sys files installed |
for the PC software to work (available also from the USB Si570 synthesiser |
software package). |
The following PC software programs have been tested with the UBW emulation so far: |
1. SI570_USB_Test.exe from the USB Si570 synthesiser software package |
2. USB_Synth.exe from the USB Si570 synthesiser software package |
2. Rocky v3.6 |
3. Guido's PowerSDR v1.9.0 sr40 |
4. WinRad with Fred's ExtIO_Si570_v0.8.dll |
5. Christos's PowerSDR-IQ v1.12.20 |
SI570_USB_Test.exe can be used test the USB communication and UBW |
functions,and for calibrating the UBW-Si570 ie. |
(1) Click "Read Si570 Register" - the default Si570 startup frequency |
and register values will be displayed |
(2) If you know the actual startup frequency of your Si570 (which is |
close to but generally not equal to the nominal startup freq of 56.32 |
Mhz), you can do the calibration now by inputting the actual freq in the |
text box to the left of the "cal on startup freq", and then hit "cal |
on startup freq". The UBW-Si570 is now calibrated for "set freq by |
value". The calibration is stored in the EEPROM of the UBW and you do |
not need to re-calibrate again unless you reload the UBW firmware from |
the .hex file. |
(3) Now you can input any freq desired in the text box and hit either |
"set freq by value" or "set freq by register". The si570 should now |
output the freq set by you. It should be accurate as set, and can be |
confirmed with an external freq counter. |
Many of the functions of the SI570_USB_Test.exe have been implemented, |
including Paddle input, RXTX level, etc. |
Both the "old" and "new" (with new icon) versions of USB_Synth.exe work in setting |
the Si570 freq. The old version uses set freq by value, and the new version |
(with enhancements) uses set freq by register. |
If the SI570_USB_Test run is OK, you can fire up Rocky v3.6 to use the |
Si570-USB functionality. Rocky uses the "set freq by value" method. You can use |
the Rocky calibration function with the UBW, but it should not be necessary and should |
be avoided. Use the calibration method in WinRad (see below under Calibration) or |
the SI570_USB_Test.exe method (see above). |
PowerSDR works by "set Freq by Register" method. You can change freq by the band buttons |
or sliding the freq up and down with the mouse. Leave the Fxtal |
freq in PowerSDR "Setup" to the default 114.285 Mhz. There is no need for |
further calibration. |
To use Winrad, you have to download the ExtIO_Si570.dll by Fred PE0FKO. Put the v0.8 |
dll in the same directory as Winrad (usually installed in "c:\Program Files\Winrad" directory). |
Calibration |
=========== |
You can use Winrad (with ExtIO_Si570_v0.8.dll by Fred) to do the calibration. This is the |
easier (and preferred method). There are two calibration methods in ExtIO_Si570.dll. One is |
calibrating to the factory default freq of the Si570 (a value close to 56.32 Mhz). The |
other method is to tune Winrad to a known frequency station, eg. the WWV stations broadcasting |
at 2.5 Mhz, 5.0 Mhz, 10.0 Mhz, 15.0 Mhz etc., and then put in the actual frequencies. For |
example, you may find a good signal of WWV at 10.023 Mhz. So the "tuned" freq is 10.023 Mhz, |
but the "real" freq is 10.000 Mhz. So you enter this real freq in the box and the hit "calibrate" |
botton. |
Si570 calibration can also be done with SI570_USB_Test.exe software, |
to calibrate the startup freq accurately once after loading (or reloading) |
of the firmware .hex file. The calibration data are then stored in the UBW EEPROM. |
If UBW is not connected to the Si570 |
==================================== |
I have eliminated the readstartupconfiguration() step. So now the UBW will NOT hang |
when it is not connected to the i2c bus on startup. On connection to USB it will be |
recognized by the PC. |
Of course, if you try to communicate with the Si570 it will hang and disconnect from |
the USB if you don't have the Si570 connected at this time. |
Restoring EEPROM to factory default condition |
============================================= |
After the UBW EEPROM is corrupted (eg. by mis-calibration), you can restore the factory default |
by reloading the .hex file. (Thanks to Mike for the suggestion.). Alternatively, you can use |
SI570_USB_Test.exe to sent 41 (hex) in the "request" box, and ff (hex) in the "Value" box, |
then click "USB ctrl msg Data to Host". This then clears the EEPROM in the UBW to the default |
condition and when you reset the UBW (hit the reset botton on the uBW, or by powering off |
and then on again). |
Using Winrad, there is a "reset" botton at the "calibrate" tab which will do the same thing. |
Download |
======== |
The UBW emulation firmware and the source files can be found in |
Files->9V1AL->UBW emulation. |
IO Port Pin assignment |
====================== |
Pin assignments for the UBW are as follows: |
Pin Name Input/Output Active Remarks |
RA0 BPF_SO O H BPF select S0 |
RA1 BPF_S1 O H BPF select S1 |
S1,S0 selects 1 of 4 BPF's for Softrock |
RA2 RXTX O H PTT, H = Transmit |
RB0 SDA Open Collector For i2c connection to Si570 |
RB1 SCL Open Collector may need conversion to +3v3 |
in case of firmware failure |
(eg wrong firmware loaded) |
then RB0 and RB1 may be set |
to logic high output of +5V |
RB6 PADDLE_DIT I L Paddle DIT Input, active low |
RB7 PADDLE_DAH I L Paddle DAH Input, active low |
As internal pullup is enabled, |
there is no need to add external |
pullup resistors. Just ground the pin |
to activate. |
RA3-5, RB2-5 LPF_x O H LPF select pins |
This has to be customised for |
the LPF bank you use. |
Email me (lee188@singnet.com.sg) |
and I will sent you a customised hex file |
Connections to SR v6.3 and Mobo v3.6 |
===================================== |
UBW SRv6.3 Mobo v3.6 External Paddle |
RA0 - P7 Pin 1 - |
RA1 - P7 Pin 2 - |
RA2 PTT_I K6 Pin 1 - |
RB0 SDA - - |
RB1 SCL - - |
GND GND P10 Pin 2 Paddle Common |
RB6 - - Paddle dot (dit) |
RB7 - - Paddle dash (dah) |
- +5V P10 Pin 1 - |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/UBW-I2C.c |
---|
0,0 → 1,413 |
/** INCLUDES *******************************************************/ |
#include "GenericTypeDefs.h" |
#include "Compiler.h" |
#include "HardwareProfile.h" |
#include "USB/usb.h" |
#include "usbavrcmd.h" |
#include "user.h" |
#include <math.h> |
#include <stdlib.h> |
#include <string.h> |
#include <ctype.h> |
#if defined (UBW) |
#include <delays.h> |
#include <i2c.h> |
#include <EEP.h> |
#elif defined (UBW32) |
#include <peripheral/i2c.h> |
#include <dee_emulation/dee_emulation_pic32.h> |
#endif |
/******************************************************************** |
* Section B: EP0 Buffer Space |
*******************************************************************/ |
extern volatile CTRL_TRF_SETUP SetupPkt; // 8-byte only |
extern volatile BYTE CtrlTrfData[USB_EP0_BUFF_SIZE]; |
#pragma udata |
WORD_VAL FilterCrossOver[8]; |
float FilterSwitchOver[7]; |
WORD_VAL LPFCrossOver[8]; |
float LPFSwitchOver[7]; |
#pragma code |
void USBCheckUBWRequest(void) |
{ |
unsigned char paddle_byte; |
unsigned int eep_adr; |
WORD_VAL w; |
unsigned int i, j; |
unsigned char IO_data; |
#if defined (UBW32) |
unsigned int value; |
unsigned int number_of_filter_bytes; |
#else |
unsigned char number_of_filter_bytes; |
#endif |
if(SetupPkt.RequestType == USB_SETUP_TYPE_STANDARD_BITFIELD) return; // only deals with non-standard, ie user requests |
command = SetupPkt.bRequest; // save the command of the user request from the setuppacket |
// it will be used for subsequent data transfer |
switch(command) |
{ |
case CMD_GET_CW_KEY: |
paddle_byte = 0x22; // 00100010 |
if (!PADDLE_DIT) paddle_byte &= 0xdf; // 11011111 |
if (!PADDLE_DAH) paddle_byte &= 0xfd; // 11111101 |
if (RXTX) paddle_byte |= 0x10; // PB4 is the ATTINY PTT_OUT pin 00010000 |
else paddle_byte &= 0xef; // 11101111 |
replybuf[0] = paddle_byte; |
inPipes[0].pSrc.bRam = (BYTE*)&replybuf[0]; // Set Source |
inPipes[0].info.bits.ctrl_trf_mem = USB_EP0_RAM; // Set memory type |
inPipes[0].wCount.v[0] = 1; // Set data count |
inPipes[0].info.bits.busy = 1; |
break; |
case CMD_SET_USRP1: // Set RxTx and get Paddle status |
paddle_byte = 0x22; // 00100010 |
if ( SetupPkt.W_Value.v[0] ){ |
RXTX = 1; // Set PTT |
paddle_byte |= 0x10; // 00010000 |
} |
else{ |
RXTX = 0; |
paddle_byte &= 0xef; // 11101111 |
}; |
if (!PADDLE_DIT) paddle_byte &= 0xdf; // 11011111 |
if (!PADDLE_DAH) paddle_byte &= 0xfd; // 11111101 |
replybuf[0] = paddle_byte; |
inPipes[0].pSrc.bRam = (BYTE*)&replybuf[0]; // Set Source |
inPipes[0].info.bits.ctrl_trf_mem = USB_EP0_RAM; // Set memory type |
inPipes[0].wCount.v[0] = 1; // Set data count |
inPipes[0].info.bits.busy = 1; |
break; |
case CMD_SET_FREQ_REG: // Control Transfer Rx of data from HOST->UBW |
case CMD_SET_LO_SM: |
case CMD_SET_FREQ: |
case CMD_SET_XTAL: |
case CMD_SET_STARTUP: |
case CMD_SET_PPM: |
wCount = SetupPkt.wLength; |
outPipes[0].wCount.Val = SetupPkt.wLength; |
outPipes[0].pFunc = &Read_Command_Into_Buffer; |
outPipes[0].pDst.bRam = (BYTE*) &command_buffer[current_command_in].data[0]; |
outPipes[0].info.bits.busy = 1; |
break; |
case CMD_GET_PIN: // read ports |
IO_data = 0x0d; // 00001101 |
if (PADDLE_DAH) IO_data |= 0x02; // PB1 |
if (BPF_S0_STATE) IO_data |= 0x10; // PB4 |
if (BPF_S1_STATE) IO_data |= 0x20; // PB5 |
replybuf[0] = IO_data; |
inPipes[0].pSrc.bRam = (BYTE*)&replybuf[0]; // Set Source |
inPipes[0].info.bits.ctrl_trf_mem = USB_EP0_RAM; // Set memory type |
inPipes[0].wCount.v[0] = 1; // Set data count |
inPipes[0].info.bits.busy = 1; |
break; |
case CMD_SET_PORT: // set ports |
IO_data = SetupPkt.W_Value.v[0]; |
if (!abpf_flag){ |
if (IO_data & 0x10) BPF_S0 = 1; |
else BPF_S0 = 0; |
if (IO_data & 0x20) BPF_S1 = 1; |
else BPF_S1 = 0; |
}; |
break; |
case CMD_SET_IO: // set i/o bits |
IO_data = SetupPkt.W_Index.v[0] & 0x03; // only 2 bits active 00000011 |
if (!abpf_flag) { // abpf inactive |
if (IO_data & 0x01) BPF_S0 = 1; // Simulate IO_PIN1 in ATTINY |
else BPF_S0 = 0; |
if (IO_data & 0x02) BPF_S1 = 1; // Simulate IO_PIN2 in ATTINY |
else BPF_S1 = 0; |
} |
IO_data = BPF_S0_STATE; // read back status of BPF select pins |
if (BPF_S1_STATE) IO_data |= 0x02; |
else IO_data &= 0x01; |
replybuf[0] = IO_data; |
replybuf[1] = 0x00; |
inPipes[0].pSrc.bRam = (BYTE*)&replybuf[0]; // Set Source |
inPipes[0].info.bits.ctrl_trf_mem = USB_EP0_RAM; // Set memory type |
inPipes[0].wCount.v[0] = 2; // Set data count |
inPipes[0].info.bits.busy = 1; |
break; |
case CMD_GET_IO: |
IO_data = BPF_S0_STATE; // status of BPF select pins |
if (BPF_S1_STATE) IO_data |= 0x02; |
else IO_data &= 0x01; |
replybuf[0] = IO_data; |
replybuf[1] = 0x00; |
inPipes[0].pSrc.bRam = (BYTE*)&replybuf[0]; // Set Source |
inPipes[0].info.bits.ctrl_trf_mem = USB_EP0_RAM; // Set memory type |
inPipes[0].wCount.v[0] = 2; // Set data count |
inPipes[0].info.bits.busy = 1; |
break; |
case CMD_SET_FILTER: // Set and Read filter crossover points |
i = SetupPkt.W_Index.Val; |
if (i < 256){ // Rx Filter |
number_of_filter_bytes = NUM_BPF * 2; |
inPipes[0].pSrc.bRam = (BYTE*)&FilterCrossOver[0]; // Set source |
if (i < NUM_BPF) { |
FilterCrossOver[i].Val = SetupPkt.W_Value.Val; |
if (i != (NUM_BPF-1)) FilterSwitchOver[i] = Cross2Switch(FilterCrossOver[i]); |
else abpf_flag = SetupPkt.W_Value.Val; |
} |
} |
else{ // Tx filter |
number_of_filter_bytes = 16; |
inPipes[0].pSrc.bRam = (BYTE*)&LPFCrossOver[0]; // Set source |
j = i - 256; |
if ( j < 8){ |
LPFCrossOver[j].Val = SetupPkt.W_Value.Val; |
if (j != 7) LPFSwitchOver[j] = Cross2Switch(LPFCrossOver[j]); |
}; |
}; |
// now that a filter value of filter enable/disable value is set, update the EEPROM |
#if defined (UBW) |
for (i = 0; i < NUM_BPF; i++){ |
Write_b_eep((i * 2 + F_CROSS_OVER +1), FilterCrossOver[i].v[0]); |
Busy_eep(); |
Write_b_eep((i * 2 + F_CROSS_OVER + 1 + 1), FilterCrossOver[i].v[1]); |
Busy_eep(); |
} |
#elif defined (UBW32) |
for (i =0; i < NUM_BPF; i++) DataEEWrite( FilterCrossOver[i].Val , (i + F_CROSS_OVER +1)); |
#endif |
#if defined (UBW) |
for (j = 0; j < 8; j++){ |
Write_b_eep(( j * 2 + F_CROSS_OVER +17), LPFCrossOver[j].v[0]); |
Busy_eep(); |
Write_b_eep(( j * 2 + F_CROSS_OVER +17 + 1), LPFCrossOver[j].v[1]); |
Busy_eep(); |
} |
Write_b_eep(F_CROSS_OVER, F_CROSS_OVER_VALUE); |
Busy_eep(); |
#elif defined (UBW32) |
for (j = 0; j < 8; j++){ |
DataEEWrite( (unsigned int)LPFCrossOver[j].Val , (j + F_CROSS_OVER +9)); |
}; |
DataEEWrite(F_CROSS_OVER_VALUE, F_CROSS_OVER); |
#endif |
inPipes[0].wCount.v[0] = number_of_filter_bytes; // Set data count |
inPipes[0].info.bits.ctrl_trf_mem = USB_EP0_RAM; // Set memory type |
inPipes[0].info.bits.busy = 1; |
break; |
case CMD_SET_SI570: // SI570: write byte from register index |
i2c_adr = SetupPkt.W_Value.v[0]; |
#if defined (UBW) |
IdleI2C(); |
StartI2C(); |
IdleI2C(); |
WriteI2C( i2c_adr <<1); |
WriteI2C( SetupPkt.W_Value.v[1]); // register = byte 3 |
WriteI2C( SetupPkt.W_Index.v[0]); // value to write to register |
StopI2C(); |
IdleI2C(); |
#elif defined (UBW32) |
IdleI2C1(); |
StartI2C1(); |
IdleI2C1(); |
MasterWriteI2C1( i2c_adr <<1); |
MasterWriteI2C1( SetupPkt.W_Value.v[1]); // register = byte 3 |
MasterWriteI2C1( SetupPkt.W_Index.v[0]); // value to write to register |
StopI2C1(); |
IdleI2C1(); |
#endif |
replybuf[0] = 0; // just say no errors |
inPipes[0].pSrc.bRam = (BYTE*)&replybuf[0]; // Set Source |
inPipes[0].info.bits.ctrl_trf_mem = USB_EP0_RAM; // Set memory type |
inPipes[0].wCount.v[0] = 1; // Set data count |
inPipes[0].info.bits.busy = 1; |
break; |
case CMD_GET_LO_SM: // return sub mul |
for (i=0; i<4; i++) replybuf[i] = f_sub.bytes[i]; |
for (i=0; i<4; i++) replybuf[i+4] = f_mul.bytes[i]; |
inPipes[0].pSrc.bRam = (BYTE*)&replybuf[0]; // Set Source |
inPipes[0].info.bits.ctrl_trf_mem = USB_EP0_RAM; // Set memory type |
inPipes[0].wCount.v[0] = 8; // Set data count |
inPipes[0].info.bits.busy = 1; |
break; |
case CMD_GET_FREQ: // return set freq, ie no offset/mul |
avr_freq.qw = set_frequency * (double)(1L << 21); |
inPipes[0].pSrc.bRam = (BYTE*)&avr_freq.bytes[0]; // Set Source |
inPipes[0].info.bits.ctrl_trf_mem = USB_EP0_RAM; // Set memory type |
inPipes[0].wCount.v[0] = 4; // Set data count |
inPipes[0].info.bits.busy = 1; |
break; |
case CMD_GET_PPM: // return smooth tune in ppm |
w.Val = Smooth_double * 1000000L; |
inPipes[0].pSrc.bRam = (BYTE*)&w.v[0]; // Set Source |
inPipes[0].info.bits.ctrl_trf_mem = USB_EP0_RAM; // Set memory type |
inPipes[0].wCount.v[0] = 2; // Set data count |
inPipes[0].info.bits.busy = 1; |
break; |
case CMD_GET_STARTUP: // return init startup freq |
#if defined(UBW) |
for (i=0; i<4; i++) avr_freq.bytes[i] = Read_b_eep(i + F_INIT_FREQ +1); |
#elif defined(UBW32) |
for (i=0; i<4; i++) { |
DataEERead(&value, (i + F_INIT_FREQ +1)); |
avr_freq.bytes[i] = value; |
}; |
#endif |
inPipes[0].pSrc.bRam = (BYTE*)&avr_freq.bytes[0]; // Set Source |
inPipes[0].info.bits.ctrl_trf_mem = USB_EP0_RAM; // Set memory type |
inPipes[0].wCount.v[0] = 4; // Set data count |
inPipes[0].info.bits.busy = 1; |
break; |
case CMD_GET_XTAL: // return fcryst |
inPipes[0].pSrc.bRam = (BYTE*)&fcryst_freq.bytes[0]; // Set Source |
inPipes[0].info.bits.ctrl_trf_mem = USB_EP0_RAM; // Set memory type |
inPipes[0].wCount.v[0] = 4; // Set data count |
inPipes[0].info.bits.busy = 1; |
break; |
case CMD_GET_SI570: // SI570: read out frequency control registers |
i2c_adr = SetupPkt.W_Value.v[0]; |
ReadRegs(); |
inPipes[0].pSrc.bRam = (BYTE*)®isters[0]; // Set Source |
inPipes[0].info.bits.ctrl_trf_mem = USB_EP0_RAM; // Set memory type |
inPipes[0].wCount.v[0] = 6; // Set data count |
inPipes[0].info.bits.busy = 1; |
break; |
case CMD_GET_I2C_ERR: // return # of i2c errors, set to zero always |
replybuf[0] = 0; // No errors :) |
inPipes[0].pSrc.bRam = (BYTE*)&replybuf[0]; // Set Source |
inPipes[0].info.bits.ctrl_trf_mem = USB_EP0_RAM; // Set memory type |
inPipes[0].wCount.v[0] = 1; // Set data count |
inPipes[0].info.bits.busy = 1; |
break; |
case CMD_SET_I2C_ADDR: // Reset EEPROM to default values if 255 |
// Otherwise just set i2c address |
if (SetupPkt.W_Value.v[0] == 0xff){ |
#if defined (UBW) |
Write_b_eep(F_CAL_DONE, 0xff); |
Busy_eep(); |
Write_b_eep(F_INIT_FREQ, 0xff); |
Busy_eep(); |
Write_b_eep(F_SMOOTH, 0xff); |
Busy_eep(); |
Write_b_eep(F_SUB_MUL, 0xff); |
Busy_eep(); |
Write_b_eep(F_CROSS_OVER, 0xff); |
Busy_eep(); |
#elif defined (UBW32) |
DataEEWrite( (unsigned int) 0xff, F_CAL_DONE); |
DataEEWrite( (unsigned int) 0xff, F_INIT_FREQ); |
DataEEWrite( (unsigned int) 0xff, F_SMOOTH); |
DataEEWrite( (unsigned int) 0xff, F_SUB_MUL); |
DataEEWrite( (unsigned int) 0xff, F_CROSS_OVER); |
#endif |
i2c_adr = 0x55; |
} |
else { |
i2c_adr = SetupPkt.W_Value.v[0]; |
}; |
replybuf[0] = 0x00; |
inPipes[0].pSrc.bRam = (BYTE*)&replybuf[0]; // Set Source |
inPipes[0].info.bits.ctrl_trf_mem = USB_EP0_RAM; // Set memory type |
inPipes[0].wCount.v[0] = 1; // Set data count |
inPipes[0].info.bits.busy = 1; |
break; |
case CMD_GET_VERSION: // return version 15.10 |
replybuf[0] = VERSION_MINOR; |
replybuf[1] = VERSION_MAJOR; |
inPipes[0].pSrc.bRam = (BYTE*)&replybuf[0]; // Set Source |
inPipes[0].info.bits.ctrl_trf_mem = USB_EP0_RAM; // Set memory type |
inPipes[0].wCount.v[0] = 2; // Set data count |
inPipes[0].info.bits.busy = 1; |
break; |
default: // Command not supported |
replybuf[0] = 0xff; |
inPipes[0].pSrc.bRam = (BYTE*)&replybuf[0] ; // Set Source |
inPipes[0].info.bits.ctrl_trf_mem = USB_EP0_RAM; // Set memory type |
inPipes[0].wCount.v[0] = 1; // Set data count |
inPipes[0].info.bits.busy = 1; |
break; |
}//end switch |
} |
void Read_Command_Into_Buffer(void) |
{ |
if (command_count >= COMMAND_BUFFER_SIZE){ // buffer full |
current_command_out++; // discards oldest command |
if (current_command_out >= COMMAND_BUFFER_SIZE) current_command_out = 0; |
command_count--; // now one command less (discarded) |
}; |
command_buffer[current_command_in].command = command; |
command_buffer[current_command_in].wCount = wCount; |
// data already copied to command_buffer before this outpipe pFunc is called |
current_command_in++; |
if (current_command_in >= COMMAND_BUFFER_SIZE) current_command_in = 0; |
command_count++; |
} |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/USB Device - MCHPUSB - Generic Driver - C18 - PIC18F4550.mcp |
---|
0,0 → 1,130 |
[HEADER] |
magic_cookie={66E99B07-E706-4689-9E80-9B2582898A13} |
file_version=1.0 |
device=PIC18F4550 |
[PATH_INFO] |
BuildDirPolicy=BuildDirIsProjectDir |
dir_src= |
dir_bin= |
dir_tmp=.\Objects\USB Device - Generic Driver Demo - C18 - PICDEM FSUSB |
dir_sin= |
dir_inc=C:\library\Microchip\Include\USB;C:\library\Microchip\USB;C:\library\Microchip\Include;. |
dir_lib=C:\Program Files\Microchip\MCC18\lib |
dir_lkr= |
[CAT_FILTERS] |
filter_src=*.asm;*.c |
filter_inc=*.h;*.inc |
filter_obj=*.o |
filter_lib=*.lib |
filter_lkr=*.lkr |
[CAT_SUBFOLDERS] |
subfolder_src=USB Stack |
subfolder_inc=Common;USB Stack |
subfolder_obj= |
subfolder_lib= |
subfolder_lkr= |
[FILE_SUBFOLDERS] |
file_000=. |
file_001=. |
file_002=. |
file_003=. |
file_004=USB Stack |
file_005=USB Stack |
file_006=USB Stack |
file_007=. |
file_008=. |
file_009=. |
file_010=Common |
file_011=Common |
file_012=USB Stack |
file_013=USB Stack |
file_014=USB Stack |
file_015=USB Stack |
file_016=USB Stack |
file_017=USB Stack |
file_018=USB Stack |
file_019=. |
file_020=. |
[GENERATED_FILES] |
file_000=no |
file_001=no |
file_002=no |
file_003=no |
file_004=no |
file_005=no |
file_006=no |
file_007=no |
file_008=no |
file_009=no |
file_010=no |
file_011=no |
file_012=no |
file_013=no |
file_014=no |
file_015=no |
file_016=no |
file_017=no |
file_018=no |
file_019=no |
file_020=no |
[OTHER_FILES] |
file_000=no |
file_001=no |
file_002=no |
file_003=no |
file_004=no |
file_005=no |
file_006=no |
file_007=no |
file_008=no |
file_009=no |
file_010=no |
file_011=no |
file_012=no |
file_013=no |
file_014=no |
file_015=no |
file_016=no |
file_017=no |
file_018=no |
file_019=no |
file_020=no |
[FILE_INFO] |
file_000=user.c |
file_001=main.c |
file_002=usb_descriptors.c |
file_003=UBW-I2C.c |
file_004=C:\library\Microchip\USB\usb_device.c |
file_005=C:\library\Microchip\Include\USB\usb_device.h |
file_006=C:\library\Microchip\Include\USB\usb_function_generic.h |
file_007=HardwareProfile.h |
file_008=user.h |
file_009=usb_config.h |
file_010=C:\library\Microchip\Include\GenericTypeDefs.h |
file_011=C:\library\Microchip\Include\Compiler.h |
file_012=C:\library\Microchip\Include\USB\usb_hal_pic18.h |
file_013=C:\library\Microchip\Include\USB\usb.h |
file_014=C:\library\Microchip\Include\USB\usb_ch9.h |
file_015=C:\library\Microchip\Include\USB\usb_common.h |
file_016=C:\library\Microchip\Include\USB\usb_device.h |
file_017=C:\library\Microchip\Include\USB\usb_function_generic.h |
file_018=C:\library\Microchip\Include\USB\usb_hal.h |
file_019=HardwareProfile - UBW.h |
file_020=rm18f4550.lkr |
[SUITE_INFO] |
suite_guid={5B7D72DD-9861-47BD-9F60-2BE967BF8416} |
suite_state= |
[TOOL_SETTINGS] |
TS{DD2213A8-6310-47B1-8376-9430CDFC013F}= |
TS{BFD27FBA-4A02-4C0E-A5E5-B812F3E7707C}=/m"$(BINDIR_)$(TARGETBASE).map" /w /o"$(TARGETBASE).cof" |
TS{C2AF05E7-1416-4625-923D-E114DB6E2B96}=-Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- |
TS{ADE93A55-C7C7-4D4D-A4BA-59305F7D0391}= |
[INSTRUMENTED_TRACE] |
enable=0 |
transport=0 |
format=0 |
[CUSTOM_BUILD] |
Pre-Build= |
Pre-BuildEnabled=1 |
Post-Build= |
Post-BuildEnabled=1 |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/main.c |
---|
0,0 → 1,980 |
/******************************************************************** |
FileName: main.c |
Dependencies: See INCLUDES section |
Processor: PIC18 or PIC24 USB Microcontrollers |
Hardware: The code is natively intended to be used on the following |
hardware platforms: PICDEM FS USB Demo Board, |
PIC18F87J50 FS USB Plug-In Module, or |
Explorer 16 + PIC24 USB PIM. The firmware may be |
modified for use on other USB platforms by editing the |
HardwareProfile.h file. |
Complier: Microchip C18 (for PIC18) or C30 (for PIC24) |
Company: Microchip Technology, Inc. |
Software License Agreement: |
The software supplied herewith by Microchip Technology Incorporated |
(the Company) for its PIC® Microcontroller is intended and |
supplied to you, the Companys customer, for use solely and |
exclusively on Microchip PIC Microcontroller products. The |
software is owned by the Company and/or its supplier, and is |
protected under applicable copyright laws. All rights are reserved. |
Any use in violation of the foregoing restrictions may subject the |
user to criminal sanctions under applicable laws, as well as to |
civil liability for the breach of the terms and conditions of this |
license. |
THIS SOFTWARE IS PROVIDED IN AN AS IS CONDITION. NO WARRANTIES, |
WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED |
TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, |
IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR |
CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
******************************************************************** |
File Description: |
Change History: |
Rev Date Description |
1.0 11/19/2004 Initial release |
2.1 02/26/2007 Updated for simplicity and to use common |
coding style |
********************************************************************/ |
/** INCLUDES *******************************************************/ |
#include "USB/usb.h" |
#include "USB/usb_function_generic.h" |
#include "user.h" // Modifiable |
#include "HardwareProfile.h" |
/** CONFIGURATION **************************************************/ |
#if defined(PICDEM_FS_USB) // Configuration bits for PICDEM FS USB Demo Board (based on PIC18F4550) |
#pragma config PLLDIV = 5 // (20 MHz crystal on PICDEM FS USB board) |
#pragma config CPUDIV = OSC1_PLL2 |
#pragma config USBDIV = 2 // Clock source from 96MHz PLL/2 |
#pragma config FOSC = HSPLL_HS |
#pragma config FCMEN = OFF |
#pragma config IESO = OFF |
#pragma config PWRT = OFF |
#pragma config BOR = ON |
#pragma config BORV = 3 |
#pragma config VREGEN = ON //USB Voltage Regulator |
#pragma config WDT = OFF |
#pragma config WDTPS = 32768 |
#pragma config MCLRE = ON |
#pragma config LPT1OSC = OFF |
#pragma config PBADEN = OFF |
// #pragma config CCP2MX = ON |
#pragma config STVREN = ON |
#pragma config LVP = OFF |
// #pragma config ICPRT = OFF // Dedicated In-Circuit Debug/Programming |
#pragma config XINST = OFF // Extended Instruction Set |
#pragma config CP0 = OFF |
#pragma config CP1 = OFF |
// #pragma config CP2 = OFF |
// #pragma config CP3 = OFF |
#pragma config CPB = OFF |
// #pragma config CPD = OFF |
#pragma config WRT0 = OFF |
#pragma config WRT1 = OFF |
// #pragma config WRT2 = OFF |
// #pragma config WRT3 = OFF |
#pragma config WRTB = OFF // Boot Block Write Protection |
#pragma config WRTC = OFF |
// #pragma config WRTD = OFF |
#pragma config EBTR0 = OFF |
#pragma config EBTR1 = OFF |
// #pragma config EBTR2 = OFF |
// #pragma config EBTR3 = OFF |
#pragma config EBTRB = OFF |
#elif defined(PIC18F87J50_PIM) // Configuration bits for PIC18F87J50 FS USB Plug-In Module board |
#pragma config XINST = OFF // Extended instruction set |
#pragma config STVREN = ON // Stack overflow reset |
#pragma config PLLDIV = 3 // (12 MHz crystal used on this board) |
#pragma config WDTEN = OFF // Watch Dog Timer (WDT) |
#pragma config CP0 = OFF // Code protect |
#pragma config CPUDIV = OSC1 // OSC1 = divide by 1 mode |
#pragma config IESO = OFF // Internal External (clock) Switchover |
#pragma config FCMEN = OFF // Fail Safe Clock Monitor |
#pragma config FOSC = HSPLL // Firmware must also set OSCTUNE<PLLEN> to start PLL! |
#pragma config WDTPS = 32768 |
// #pragma config WAIT = OFF // Commented choices are |
// #pragma config BW = 16 // only available on the |
// #pragma config MODE = MM // 80 pin devices in the |
// #pragma config EASHFT = OFF // family. |
#pragma config MSSPMSK = MSK5 |
// #pragma config PMPMX = DEFAULT |
// #pragma config ECCPMX = DEFAULT |
#pragma config CCP2MX = DEFAULT |
#elif defined(PIC18F46J50_PIM) || defined(PIC18F_STARTER_KIT_1) |
#pragma config WDTEN = OFF //WDT disabled (enabled by SWDTEN bit) |
#pragma config PLLDIV = 3 //Divide by 3 (12 MHz oscillator input) |
#pragma config STVREN = ON //stack overflow/underflow reset enabled |
#pragma config XINST = OFF //Extended instruction set disabled |
#pragma config CPUDIV = OSC1 //No CPU system clock divide |
#pragma config CP0 = OFF //Program memory is not code-protected |
#pragma config OSC = HSPLL //HS oscillator, PLL enabled, HSPLL used by USB |
#pragma config T1DIG = ON //Sec Osc clock source may be selected |
#pragma config LPT1OSC = OFF //high power Timer1 mode |
#pragma config FCMEN = OFF //Fail-Safe Clock Monitor disabled |
#pragma config IESO = OFF //Two-Speed Start-up disabled |
#pragma config WDTPS = 32768 //1:32768 |
#pragma config DSWDTOSC = INTOSCREF //DSWDT uses INTOSC/INTRC as clock |
#pragma config RTCOSC = T1OSCREF //RTCC uses T1OSC/T1CKI as clock |
#pragma config DSBOREN = OFF //Zero-Power BOR disabled in Deep Sleep |
#pragma config DSWDTEN = OFF //Disabled |
#pragma config DSWDTPS = 8192 //1:8,192 (8.5 seconds) |
#pragma config IOL1WAY = OFF //IOLOCK bit can be set and cleared |
#pragma config MSSP7B_EN = MSK7 //7 Bit address masking |
#pragma config WPFP = PAGE_1 //Write Protect Program Flash Page 0 |
#pragma config WPEND = PAGE_0 //Start protection at page 0 |
#pragma config WPCFG = OFF //Write/Erase last page protect Disabled |
#pragma config WPDIS = OFF //WPFP[5:0], WPEND, and WPCFG bits ignored |
#elif defined(LOW_PIN_COUNT_USB_DEVELOPMENT_KIT) |
// PIC18F14K50 |
#pragma config CPUDIV = NOCLKDIV |
#pragma config USBDIV = OFF |
#pragma config FOSC = HS |
#pragma config PLLEN = ON |
#pragma config FCMEN = OFF |
#pragma config IESO = OFF |
#pragma config PWRTEN = OFF |
#pragma config BOREN = OFF |
#pragma config BORV = 30 |
#pragma config WDTEN = OFF |
#pragma config WDTPS = 32768 |
#pragma config MCLRE = OFF |
#pragma config HFOFST = OFF |
#pragma config STVREN = ON |
#pragma config LVP = OFF |
#pragma config XINST = OFF |
#pragma config BBSIZ = OFF |
#pragma config CP0 = OFF |
#pragma config CP1 = OFF |
#pragma config CPB = OFF |
#pragma config WRT0 = OFF |
#pragma config WRT1 = OFF |
#pragma config WRTB = OFF |
#pragma config WRTC = OFF |
#pragma config EBTR0 = OFF |
#pragma config EBTR1 = OFF |
#pragma config EBTRB = OFF |
#elif defined(EXPLORER_16) |
#ifdef __PIC24FJ256GB110__ //Defined by MPLAB when using 24FJ256GB110 device |
_CONFIG1( JTAGEN_OFF & GCP_OFF & GWRP_OFF & COE_OFF & FWDTEN_OFF & ICS_PGx2) |
_CONFIG2( 0xF7FF & IESO_OFF & FCKSM_CSDCMD & OSCIOFNC_ON & POSCMOD_HS & FNOSC_PRIPLL & PLLDIV_DIV2 & IOL1WAY_ON) |
#elif defined(__PIC24FJ64GB004__) |
_CONFIG1(WDTPS_PS1 & FWPSA_PR32 & WINDIS_OFF & FWDTEN_OFF & ICS_PGx1 & GWRP_OFF & GCP_OFF & JTAGEN_OFF) |
_CONFIG2(POSCMOD_HS & I2C1SEL_PRI & IOL1WAY_OFF & OSCIOFNC_ON & FCKSM_CSDCMD & FNOSC_PRIPLL & PLL96MHZ_ON & PLLDIV_DIV2 & IESO_ON) |
_CONFIG3(WPFP_WPFP0 & SOSCSEL_SOSC & WUTSEL_LEG & WPDIS_WPDIS & WPCFG_WPCFGDIS & WPEND_WPENDMEM) |
_CONFIG4(DSWDTPS_DSWDTPS3 & DSWDTOSC_LPRC & RTCOSC_SOSC & DSBOREN_OFF & DSWDTEN_OFF) |
#elif defined(__32MX460F512L__) || defined(__32MX795F512L__) |
#pragma config UPLLEN = ON // USB PLL Enabled |
#pragma config FPLLMUL = MUL_15 // PLL Multiplier |
#pragma config UPLLIDIV = DIV_2 // USB PLL Input Divider |
#pragma config FPLLIDIV = DIV_2 // PLL Input Divider |
#pragma config FPLLODIV = DIV_1 // PLL Output Divider |
#pragma config FPBDIV = DIV_1 // Peripheral Clock divisor |
#pragma config FWDTEN = OFF // Watchdog Timer |
#pragma config WDTPS = PS1 // Watchdog Timer Postscale |
#pragma config FCKSM = CSDCMD // Clock Switching & Fail Safe Clock Monitor |
#pragma config OSCIOFNC = OFF // CLKO Enable |
#pragma config POSCMOD = HS // Primary Oscillator |
#pragma config IESO = OFF // Internal/External Switch-over |
#pragma config FSOSCEN = OFF // Secondary Oscillator Enable (KLO was off) |
#pragma config FNOSC = PRIPLL // Oscillator Selection |
#pragma config CP = OFF // Code Protect |
#pragma config BWP = OFF // Boot Flash Write Protect |
#pragma config PWP = OFF // Program Flash Write Protect |
#pragma config ICESEL = ICS_PGx2 // ICE/ICD Comm Channel Select |
#pragma config DEBUG = ON // Background Debugger Enable |
#else |
#error No hardware board defined, see "HardwareProfile.h" and __FILE__ |
#endif |
#elif defined(PIC24F_STARTER_KIT) |
_CONFIG1( JTAGEN_OFF & GCP_OFF & GWRP_OFF & COE_OFF & FWDTEN_OFF & ICS_PGx2) |
_CONFIG2( 0xF7FF & IESO_OFF & FCKSM_CSDCMD & OSCIOFNC_ON & POSCMOD_HS & FNOSC_PRIPLL & PLLDIV_DIV3 & IOL1WAY_ON) |
#elif defined(PIC24FJ256DA210_DEV_BOARD) |
//_CONFIG1(FWDTEN_OFF & ICS_PGx2 & COE_OFF & GWRP_OFF & GCP_OFF & JTAGEN_OFF) |
//_CONFIG2(POSCMOD_HS & IOL1WAY_ON & OSCIOFNC_ON & FCKSM_CSDCMD & FNOSC_PRIPLL & PLL96MHZ_ON & PLLDIV_DIV2 & IESO_OFF) |
#elif defined(PIC32_USB_STARTER_KIT) |
#pragma config UPLLEN = ON // USB PLL Enabled |
#pragma config FPLLMUL = MUL_15 // PLL Multiplier |
#pragma config UPLLIDIV = DIV_2 // USB PLL Input Divider |
#pragma config FPLLIDIV = DIV_2 // PLL Input Divider |
#pragma config FPLLODIV = DIV_1 // PLL Output Divider |
#pragma config FPBDIV = DIV_1 // Peripheral Clock divisor |
#pragma config FWDTEN = OFF // Watchdog Timer |
#pragma config WDTPS = PS1 // Watchdog Timer Postscale |
#pragma config FCKSM = CSDCMD // Clock Switching & Fail Safe Clock Monitor |
#pragma config OSCIOFNC = OFF // CLKO Enable |
#pragma config POSCMOD = HS // Primary Oscillator |
#pragma config IESO = OFF // Internal/External Switch-over |
#pragma config FSOSCEN = OFF // Secondary Oscillator Enable (KLO was off) |
#pragma config FNOSC = PRIPLL // Oscillator Selection |
#pragma config CP = OFF // Code Protect |
#pragma config BWP = OFF // Boot Flash Write Protect |
#pragma config PWP = OFF // Program Flash Write Protect |
#pragma config ICESEL = ICS_PGx2 // ICE/ICD Comm Channel Select |
#pragma config DEBUG = ON // Background Debugger Enable |
#elif defined(UBW) |
#elif defined(UBW32) |
#else |
#error No hardware board defined, see "HardwareProfile.h" and __FILE__ |
#endif |
/** VARIABLES ******************************************************/ |
#pragma udata |
/** PRIVATE PROTOTYPES *********************************************/ |
static void InitializeSystem(void); |
void USBDeviceTasks(void); |
void YourHighPriorityISRCode(void); |
void YourLowPriorityISRCode(void); |
/** VECTOR REMAPPING ***********************************************/ |
#if defined(__18CXX) |
//On PIC18 devices, addresses 0x00, 0x08, and 0x18 are used for |
//the reset, high priority interrupt, and low priority interrupt |
//vectors. However, the current Microchip USB bootloader |
//examples are intended to occupy addresses 0x00-0x7FF or |
//0x00-0xFFF depending on which bootloader is used. Therefore, |
//the bootloader code remaps these vectors to new locations |
//as indicated below. This remapping is only necessary if you |
//wish to program the hex file generated from this project with |
//the USB bootloader. If no bootloader is used, edit the |
//usb_config.h file and comment out the following defines: |
//#define PROGRAMMABLE_WITH_USB_HID_BOOTLOADER |
//#define PROGRAMMABLE_WITH_USB_LEGACY_CUSTOM_CLASS_BOOTLOADER |
#if defined(PROGRAMMABLE_WITH_USB_HID_BOOTLOADER) |
#define REMAPPED_RESET_VECTOR_ADDRESS 0x1000 |
#define REMAPPED_HIGH_INTERRUPT_VECTOR_ADDRESS 0x1008 |
#define REMAPPED_LOW_INTERRUPT_VECTOR_ADDRESS 0x1018 |
#elif defined(PROGRAMMABLE_WITH_USB_MCHPUSB_BOOTLOADER) |
#define REMAPPED_RESET_VECTOR_ADDRESS 0x800 |
#define REMAPPED_HIGH_INTERRUPT_VECTOR_ADDRESS 0x808 |
#define REMAPPED_LOW_INTERRUPT_VECTOR_ADDRESS 0x818 |
#else |
#define REMAPPED_RESET_VECTOR_ADDRESS 0x00 |
#define REMAPPED_HIGH_INTERRUPT_VECTOR_ADDRESS 0x08 |
#define REMAPPED_LOW_INTERRUPT_VECTOR_ADDRESS 0x18 |
#endif |
#if defined(PROGRAMMABLE_WITH_USB_HID_BOOTLOADER)||defined(PROGRAMMABLE_WITH_USB_MCHPUSB_BOOTLOADER) |
extern void _startup (void); // See c018i.c in your C18 compiler dir |
#pragma code REMAPPED_RESET_VECTOR = REMAPPED_RESET_VECTOR_ADDRESS |
void _reset (void) |
{ |
_asm goto _startup _endasm |
} |
#endif |
#pragma code REMAPPED_HIGH_INTERRUPT_VECTOR = REMAPPED_HIGH_INTERRUPT_VECTOR_ADDRESS |
void Remapped_High_ISR (void) |
{ |
_asm goto YourHighPriorityISRCode _endasm |
} |
#pragma code REMAPPED_LOW_INTERRUPT_VECTOR = REMAPPED_LOW_INTERRUPT_VECTOR_ADDRESS |
void Remapped_Low_ISR (void) |
{ |
_asm goto YourLowPriorityISRCode _endasm |
} |
#if defined(PROGRAMMABLE_WITH_USB_HID_BOOTLOADER)||defined(PROGRAMMABLE_WITH_USB_MCHPUSB_BOOTLOADER) |
//Note: If this project is built while one of the bootloaders has |
//been defined, but then the output hex file is not programmed with |
//the bootloader, addresses 0x08 and 0x18 would end up programmed with 0xFFFF. |
//As a result, if an actual interrupt was enabled and occured, the PC would jump |
//to 0x08 (or 0x18) and would begin executing "0xFFFF" (unprogrammed space). This |
//executes as nop instructions, but the PC would eventually reach the REMAPPED_RESET_VECTOR_ADDRESS |
//(0x1000 or 0x800, depending upon bootloader), and would execute the "goto _startup". This |
//would effective reset the application. |
//To fix this situation, we should always deliberately place a |
//"goto REMAPPED_HIGH_INTERRUPT_VECTOR_ADDRESS" at address 0x08, and a |
//"goto REMAPPED_LOW_INTERRUPT_VECTOR_ADDRESS" at address 0x18. When the output |
//hex file of this project is programmed with the bootloader, these sections do not |
//get bootloaded (as they overlap the bootloader space). If the output hex file is not |
//programmed using the bootloader, then the below goto instructions do get programmed, |
//and the hex file still works like normal. The below section is only required to fix this |
//scenario. |
#pragma code HIGH_INTERRUPT_VECTOR = 0x08 |
void High_ISR (void) |
{ |
_asm goto REMAPPED_HIGH_INTERRUPT_VECTOR_ADDRESS _endasm |
} |
#pragma code LOW_INTERRUPT_VECTOR = 0x18 |
void Low_ISR (void) |
{ |
_asm goto REMAPPED_LOW_INTERRUPT_VECTOR_ADDRESS _endasm |
} |
#endif //end of "#if defined(PROGRAMMABLE_WITH_USB_HID_BOOTLOADER)||defined(PROGRAMMABLE_WITH_USB_LEGACY_CUSTOM_CLASS_BOOTLOADER)" |
#pragma code |
//These are your actual interrupt handling routines. |
#pragma interrupt YourHighPriorityISRCode |
void YourHighPriorityISRCode() |
{ |
//Check which interrupt flag caused the interrupt. |
//Service the interrupt |
//Clear the interrupt flag |
//Etc. |
#if defined(USB_INTERRUPT) |
USBDeviceTasks(); |
#endif |
} //This return will be a "retfie fast", since this is in a #pragma interrupt section |
#pragma interruptlow YourLowPriorityISRCode |
void YourLowPriorityISRCode() |
{ |
//Check which interrupt flag caused the interrupt. |
//Service the interrupt |
//Clear the interrupt flag |
//Etc. |
} //This return will be a "retfie", since this is in a #pragma interruptlow section |
#elif defined(__C30__) |
#if defined(PROGRAMMABLE_WITH_USB_HID_BOOTLOADER) |
/* |
* ISR JUMP TABLE |
* |
* It is necessary to define jump table as a function because C30 will |
* not store 24-bit wide values in program memory as variables. |
* |
* This function should be stored at an address where the goto instructions |
* line up with the remapped vectors from the bootloader's linker script. |
* |
* For more information about how to remap the interrupt vectors, |
* please refer to AN1157. An example is provided below for the T2 |
* interrupt with a bootloader ending at address 0x1400 |
*/ |
// void __attribute__ ((address(0x1404))) ISRTable(){ |
// |
// asm("reset"); //reset instruction to prevent runaway code |
// asm("goto %0"::"i"(&_T2Interrupt)); //T2Interrupt's address |
// } |
#endif |
#endif |
/** DECLARATIONS ***************************************************/ |
#pragma code |
/****************************************************************************** |
* Function: void main(void) |
* |
* PreCondition: None |
* |
* Input: None |
* |
* Output: None |
* |
* Side Effects: None |
* |
* Overview: Main program entry point. |
* |
* Note: None |
*******************************************************************/ |
#if defined(__18CXX) |
void main(void) |
#else |
int main(void) |
#endif |
{ |
InitializeSystem(); |
#if defined(USB_INTERRUPT) |
USBDeviceAttach(); |
#endif |
while(1) |
{ |
#if defined(USB_POLLING) |
// Check bus status and service USB interrupts. |
USBDeviceTasks(); // Interrupt or polling method. If using polling, must call |
// this function periodically. This function will take care |
// of processing and responding to SETUP transactions |
// (such as during the enumeration process when you first |
// plug in). USB hosts require that USB devices should accept |
// and process SETUP packets in a timely fashion. Therefore, |
// when using polling, this function should be called |
// frequently (such as once about every 100 microseconds) at any |
// time that a SETUP packet might reasonably be expected to |
// be sent by the host to your device. In most cases, the |
// USBDeviceTasks() function does not take very long to |
// execute (~50 instruction cycles) before it returns. |
#endif |
// Application-specific tasks. |
// Application related code may be added here, or in the ProcessIO() function. |
ProcessIO(); |
}//end while |
}//end main |
/******************************************************************** |
* Function: static void InitializeSystem(void) |
* |
* PreCondition: None |
* |
* Input: None |
* |
* Output: None |
* |
* Side Effects: None |
* |
* Overview: InitializeSystem is a centralize initialization |
* routine. All required USB initialization routines |
* are called from here. |
* |
* User application initialization routine should |
* also be called from here. |
* |
* Note: None |
*******************************************************************/ |
static void InitializeSystem(void) |
{ |
#if (defined(__18CXX) & !defined(PIC18F87J50_PIM)) |
ADCON1 |= 0x0F; // Default all pins to digital |
#elif defined(__C30__) |
#if defined(PIC24FJ256DA210_DEV_BOARD) |
ANSA = 0x0000; |
ANSB = 0x0000; |
ANSC = 0x0000; |
ANSD = 0x0000; |
ANSE = 0x0000; |
ANSF = 0x0000; |
ANSG = 0x0000; |
#else |
AD1PCFGL = 0xFFFF; |
#endif |
#elif defined(__C32__) |
AD1PCFG = 0xFFFF; |
#endif |
#if defined(PIC18F87J50_PIM) || defined(PIC18F46J50_PIM) || defined(PIC18F_STARTER_KIT_1) |
//On the PIC18F87J50 Family of USB microcontrollers, the PLL will not power up and be enabled |
//by default, even if a PLL enabled oscillator configuration is selected (such as HS+PLL). |
//This allows the device to power up at a lower initial operating frequency, which can be |
//advantageous when powered from a source which is not gauranteed to be adequate for 48MHz |
//operation. On these devices, user firmware needs to manually set the OSCTUNE<PLLEN> bit to |
//power up the PLL. |
{ |
unsigned int pll_startup_counter = 600; |
OSCTUNEbits.PLLEN = 1; //Enable the PLL and wait 2+ms until the PLL locks before enabling USB module |
while(pll_startup_counter--); |
} |
//Device switches over automatically to PLL output after PLL is locked and ready. |
#endif |
#if defined(PIC18F87J50_PIM) |
//Configure all I/O pins to use digital input buffers. The PIC18F87J50 Family devices |
//use the ANCONx registers to control this, which is different from other devices which |
//use the ADCON1 register for this purpose. |
WDTCONbits.ADSHR = 1; // Select alternate SFR location to access ANCONx registers |
ANCON0 = 0xFF; // Default all pins to digital |
ANCON1 = 0xFF; // Default all pins to digital |
WDTCONbits.ADSHR = 0; // Select normal SFR locations |
#endif |
#if defined(PIC18F46J50_PIM) || defined(PIC18F_STARTER_KIT_1) |
//Configure all I/O pins to use digital input buffers. |
ANCON0 = 0x7F; // all pins to digital except AN7 |
ANCON1 = 0xBF; // Default all pins to digital. Bandgap on. |
#endif |
#if defined(PIC24FJ64GB004_PIM) || defined(PIC24FJ256DA210_DEV_BOARD) |
//On the PIC24FJ64GB004 Family of USB microcontrollers, the PLL will not power up and be enabled |
//by default, even if a PLL enabled oscillator configuration is selected (such as HS+PLL). |
//This allows the device to power up at a lower initial operating frequency, which can be |
//advantageous when powered from a source which is not gauranteed to be adequate for 32MHz |
//operation. On these devices, user firmware needs to manually set the CLKDIV<PLLEN> bit to |
//power up the PLL. |
{ |
unsigned int pll_startup_counter = 600; |
CLKDIVbits.PLLEN = 1; |
while(pll_startup_counter--); |
} |
//Device switches over automatically to PLL output after PLL is locked and ready. |
#endif |
// The USB specifications require that USB peripheral devices must never source |
// current onto the Vbus pin. Additionally, USB peripherals should not source |
// current on D+ or D- when the host/hub is not actively powering the Vbus line. |
// When designing a self powered (as opposed to bus powered) USB peripheral |
// device, the firmware should make sure not to turn on the USB module and D+ |
// or D- pull up resistor unless Vbus is actively powered. Therefore, the |
// firmware needs some means to detect when Vbus is being powered by the host. |
// A 5V tolerant I/O pin can be connected to Vbus (through a resistor), and |
// can be used to detect when Vbus is high (host actively powering), or low |
// (host is shut down or otherwise not supplying power). The USB firmware |
// can then periodically poll this I/O pin to know when it is okay to turn on |
// the USB module/D+/D- pull up resistor. When designing a purely bus powered |
// peripheral device, it is not possible to source current on D+ or D- when the |
// host is not actively providing power on Vbus. Therefore, implementing this |
// bus sense feature is optional. This firmware can be made to use this bus |
// sense feature by making sure "USE_USB_BUS_SENSE_IO" has been defined in the |
// HardwareProfile.h file. |
#if defined(USE_USB_BUS_SENSE_IO) |
tris_usb_bus_sense = INPUT_PIN; // See HardwareProfile.h |
#endif |
// If the host PC sends a GetStatus (device) request, the firmware must respond |
// and let the host know if the USB peripheral device is currently bus powered |
// or self powered. See chapter 9 in the official USB specifications for details |
// regarding this request. If the peripheral device is capable of being both |
// self and bus powered, it should not return a hard coded value for this request. |
// Instead, firmware should check if it is currently self or bus powered, and |
// respond accordingly. If the hardware has been configured like demonstrated |
// on the PICDEM FS USB Demo Board, an I/O pin can be polled to determine the |
// currently selected power source. On the PICDEM FS USB Demo Board, "RA2" |
// is used for this purpose. If using this feature, make sure "USE_SELF_POWER_SENSE_IO" |
// has been defined in HardwareProfile - (platform).h, and that an appropriate I/O pin |
// has been mapped to it. |
#if defined(USE_SELF_POWER_SENSE_IO) |
tris_self_power = INPUT_PIN; // See HardwareProfile |
#endif |
UserInit(); |
USBDeviceInit(); //usb_device.c. Initializes USB module SFRs and firmware |
//variables to known states. |
}//end InitializeSystem |
// ****************************************************************************************************** |
// ************** USB Callback Functions **************************************************************** |
// ****************************************************************************************************** |
// The USB firmware stack will call the callback functions USBCBxxx() in response to certain USB related |
// events. For example, if the host PC is powering down, it will stop sending out Start of Frame (SOF) |
// packets to your device. In response to this, all USB devices are supposed to decrease their power |
// consumption from the USB Vbus to <2.5mA each. The USB module detects this condition (which according |
// to the USB specifications is 3+ms of no bus activity/SOF packets) and then calls the USBCBSuspend() |
// function. You should modify these callback functions to take appropriate actions for each of these |
// conditions. For example, in the USBCBSuspend(), you may wish to add code that will decrease power |
// consumption from Vbus to <2.5mA (such as by clock switching, turning off LEDs, putting the |
// microcontroller to sleep, etc.). Then, in the USBCBWakeFromSuspend() function, you may then wish to |
// add code that undoes the power saving things done in the USBCBSuspend() function. |
// The USBCBSendResume() function is special, in that the USB stack will not automatically call this |
// function. This function is meant to be called from the application firmware instead. See the |
// additional comments near the function. |
/****************************************************************************** |
* Function: void USBCBSuspend(void) |
* |
* PreCondition: None |
* |
* Input: None |
* |
* Output: None |
* |
* Side Effects: None |
* |
* Overview: Call back that is invoked when a USB suspend is detected |
* |
* Note: None |
*****************************************************************************/ |
void USBCBSuspend(void) |
{ |
//Example power saving code. Insert appropriate code here for the desired |
//application behavior. If the microcontroller will be put to sleep, a |
//process similar to that shown below may be used: |
//ConfigureIOPinsForLowPower(); |
//SaveStateOfAllInterruptEnableBits(); |
//DisableAllInterruptEnableBits(); |
//EnableOnlyTheInterruptsWhichWillBeUsedToWakeTheMicro(); //should enable at least USBActivityIF as a wake source |
//Sleep(); |
//RestoreStateOfAllPreviouslySavedInterruptEnableBits(); //Preferrably, this should be done in the USBCBWakeFromSuspend() function instead. |
//RestoreIOPinsToNormal(); //Preferrably, this should be done in the USBCBWakeFromSuspend() function instead. |
//IMPORTANT NOTE: Do not clear the USBActivityIF (ACTVIF) bit here. This bit is |
//cleared inside the usb_device.c file. Clearing USBActivityIF here will cause |
//things to not work as intended. |
#if defined(__C30__) |
#if 0 |
U1EIR = 0xFFFF; |
U1IR = 0xFFFF; |
U1OTGIR = 0xFFFF; |
IFS5bits.USB1IF = 0; |
IEC5bits.USB1IE = 1; |
U1OTGIEbits.ACTVIE = 1; |
U1OTGIRbits.ACTVIF = 1; |
Sleep(); |
#endif |
#endif |
} |
/****************************************************************************** |
* Function: void _USB1Interrupt(void) |
* |
* PreCondition: None |
* |
* Input: None |
* |
* Output: None |
* |
* Side Effects: None |
* |
* Overview: This function is called when the USB interrupt bit is set |
* In this example the interrupt is only used when the device |
* goes to sleep when it receives a USB suspend command |
* |
* Note: None |
*****************************************************************************/ |
#if 0 |
void __attribute__ ((interrupt)) _USB1Interrupt(void) |
{ |
#if !defined(self_powered) |
if(U1OTGIRbits.ACTVIF) |
{ |
IEC5bits.USB1IE = 0; |
U1OTGIEbits.ACTVIE = 0; |
IFS5bits.USB1IF = 0; |
//USBClearInterruptFlag(USBActivityIFReg,USBActivityIFBitNum); |
USBClearInterruptFlag(USBIdleIFReg,USBIdleIFBitNum); |
//USBSuspendControl = 0; |
} |
#endif |
} |
#endif |
/****************************************************************************** |
* Function: void USBCBWakeFromSuspend(void) |
* |
* PreCondition: None |
* |
* Input: None |
* |
* Output: None |
* |
* Side Effects: None |
* |
* Overview: The host may put USB peripheral devices in low power |
* suspend mode (by "sending" 3+ms of idle). Once in suspend |
* mode, the host may wake the device back up by sending non- |
* idle state signalling. |
* |
* This call back is invoked when a wakeup from USB suspend |
* is detected. |
* |
* Note: None |
*****************************************************************************/ |
void USBCBWakeFromSuspend(void) |
{ |
// If clock switching or other power savings measures were taken when |
// executing the USBCBSuspend() function, now would be a good time to |
// switch back to normal full power run mode conditions. The host allows |
// a few milliseconds of wakeup time, after which the device must be |
// fully back to normal, and capable of receiving and processing USB |
// packets. In order to do this, the USB module must receive proper |
// clocking (IE: 48MHz clock must be available to SIE for full speed USB |
// operation). |
} |
/******************************************************************** |
* Function: void USBCB_SOF_Handler(void) |
* |
* PreCondition: None |
* |
* Input: None |
* |
* Output: None |
* |
* Side Effects: None |
* |
* Overview: The USB host sends out a SOF packet to full-speed |
* devices every 1 ms. This interrupt may be useful |
* for isochronous pipes. End designers should |
* implement callback routine as necessary. |
* |
* Note: None |
*******************************************************************/ |
void USBCB_SOF_Handler(void) |
{ |
// No need to clear UIRbits.SOFIF to 0 here. |
// Callback caller is already doing that. |
} |
/******************************************************************* |
* Function: void USBCBErrorHandler(void) |
* |
* PreCondition: None |
* |
* Input: None |
* |
* Output: None |
* |
* Side Effects: None |
* |
* Overview: The purpose of this callback is mainly for |
* debugging during development. Check UEIR to see |
* which error causes the interrupt. |
* |
* Note: None |
*******************************************************************/ |
void USBCBErrorHandler(void) |
{ |
// No need to clear UEIR to 0 here. |
// Callback caller is already doing that. |
// Typically, user firmware does not need to do anything special |
// if a USB error occurs. For example, if the host sends an OUT |
// packet to your device, but the packet gets corrupted (ex: |
// because of a bad connection, or the user unplugs the |
// USB cable during the transmission) this will typically set |
// one or more USB error interrupt flags. Nothing specific |
// needs to be done however, since the SIE will automatically |
// send a "NAK" packet to the host. In response to this, the |
// host will normally retry to send the packet again, and no |
// data loss occurs. The system will typically recover |
// automatically, without the need for application firmware |
// intervention. |
// Nevertheless, this callback function is provided, such as |
// for debugging purposes. |
} |
/******************************************************************* |
* Function: void USBCBCheckOtherReq(void) |
* |
* PreCondition: None |
* |
* Input: None |
* |
* Output: None |
* |
* Side Effects: None |
* |
* Overview: When SETUP packets arrive from the host, some |
* firmware must process the request and respond |
* appropriately to fulfill the request. Some of |
* the SETUP packets will be for standard |
* USB "chapter 9" (as in, fulfilling chapter 9 of |
* the official USB specifications) requests, while |
* others may be specific to the USB device class |
* that is being implemented. For example, a HID |
* class device needs to be able to respond to |
* "GET REPORT" type of requests. This |
* is not a standard USB chapter 9 request, and |
* therefore not handled by usb_device.c. Instead |
* this request should be handled by class specific |
* firmware, such as that contained in usb_function_hid.c. |
* |
* Note: None |
*****************************************************************************/ |
void USBCBCheckOtherReq(void) |
{ |
USBCheckUBWRequest(); |
}//end |
/******************************************************************* |
* Function: void USBCBStdSetDscHandler(void) |
* |
* PreCondition: None |
* |
* Input: None |
* |
* Output: None |
* |
* Side Effects: None |
* |
* Overview: The USBCBStdSetDscHandler() callback function is |
* called when a SETUP, bRequest: SET_DESCRIPTOR request |
* arrives. Typically SET_DESCRIPTOR requests are |
* not used in most applications, and it is |
* optional to support this type of request. |
* |
* Note: None |
*****************************************************************************/ |
void USBCBStdSetDscHandler(void) |
{ |
// Must claim session ownership if supporting this request |
}//end |
/****************************************************************************** |
* Function: void USBCBInitEP(void) |
* |
* PreCondition: None |
* |
* Input: None |
* |
* Output: None |
* |
* Side Effects: None |
* |
* Overview: This function is called when the device becomes |
* initialized, which occurs after the host sends a |
* SET_CONFIGURATION (wValue not = 0) request. This |
* callback function should initialize the endpoints |
* for the device's usage according to the current |
* configuration. |
* |
* Note: None |
*****************************************************************************/ |
void USBCBInitEP(void) |
{ |
} |
/******************************************************************** |
* Function: void USBCBSendResume(void) |
* |
* PreCondition: None |
* |
* Input: None |
* |
* Output: None |
* |
* Side Effects: None |
* |
* Overview: The USB specifications allow some types of USB |
* peripheral devices to wake up a host PC (such |
* as if it is in a low power suspend to RAM state). |
* This can be a very useful feature in some |
* USB applications, such as an Infrared remote |
* control receiver. If a user presses the "power" |
* button on a remote control, it is nice that the |
* IR receiver can detect this signalling, and then |
* send a USB "command" to the PC to wake up. |
* |
* The USBCBSendResume() "callback" function is used |
* to send this special USB signalling which wakes |
* up the PC. This function may be called by |
* application firmware to wake up the PC. This |
* function should only be called when: |
* |
* 1. The USB driver used on the host PC supports |
* the remote wakeup capability. |
* 2. The USB configuration descriptor indicates |
* the device is remote wakeup capable in the |
* bmAttributes field. |
* 3. The USB host PC is currently sleeping, |
* and has previously sent your device a SET |
* FEATURE setup packet which "armed" the |
* remote wakeup capability. |
* |
* This callback should send a RESUME signal that |
* has the period of 1-15ms. |
* |
* Note: Interrupt vs. Polling |
* -Primary clock |
* -Secondary clock ***** MAKE NOTES ABOUT THIS ******* |
* > Can switch to primary first by calling USBCBWakeFromSuspend() |
* The modifiable section in this routine should be changed |
* to meet the application needs. Current implementation |
* temporary blocks other functions from executing for a |
* period of 1-13 ms depending on the core frequency. |
* |
* According to USB 2.0 specification section 7.1.7.7, |
* "The remote wakeup device must hold the resume signaling |
* for at lest 1 ms but for no more than 15 ms." |
* The idea here is to use a delay counter loop, using a |
* common value that would work over a wide range of core |
* frequencies. |
* That value selected is 1800. See table below: |
* ========================================================== |
* Core Freq(MHz) MIP RESUME Signal Period (ms) |
* ========================================================== |
* 48 12 1.05 |
* 4 1 12.6 |
* ========================================================== |
* * These timing could be incorrect when using code |
* optimization or extended instruction mode, |
* or when having other interrupts enabled. |
* Make sure to verify using the MPLAB SIM's Stopwatch |
* and verify the actual signal on an oscilloscope. |
*******************************************************************/ |
void USBCBSendResume(void) |
{ |
static WORD delay_count; |
USBResumeControl = 1; // Start RESUME signaling |
delay_count = 1800U; // Set RESUME line for 1-13 ms |
do |
{ |
delay_count--; |
}while(delay_count); |
USBResumeControl = 0; |
} |
/******************************************************************* |
* Function: BOOL USER_USB_CALLBACK_EVENT_HANDLER( |
* USB_EVENT event, void *pdata, WORD size) |
* |
* PreCondition: None |
* |
* Input: USB_EVENT event - the type of event |
* void *pdata - pointer to the event data |
* WORD size - size of the event data |
* |
* Output: None |
* |
* Side Effects: None |
* |
* Overview: This function is called from the USB stack to |
* notify a user application that a USB event |
* occured. This callback is in interrupt context |
* when the USB_INTERRUPT option is selected. |
* |
* Note: None |
*******************************************************************/ |
BOOL USER_USB_CALLBACK_EVENT_HANDLER(USB_EVENT event, void *pdata, WORD size) |
{ |
switch(event) |
{ |
case EVENT_CONFIGURED: |
USBCBInitEP(); |
break; |
case EVENT_SET_DESCRIPTOR: |
USBCBStdSetDscHandler(); |
break; |
case EVENT_EP0_REQUEST: |
USBCBCheckOtherReq(); |
break; |
case EVENT_SOF: |
USBCB_SOF_Handler(); |
break; |
case EVENT_SUSPEND: |
USBCBSuspend(); |
break; |
case EVENT_RESUME: |
USBCBWakeFromSuspend(); |
break; |
case EVENT_BUS_ERROR: |
USBCBErrorHandler(); |
break; |
case EVENT_TRANSFER: |
Nop(); |
break; |
default: |
break; |
} |
return TRUE; |
} |
/** EOF main.c ***************************************************************/ |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/rm18f4550 - HID Bootload.lkr |
---|
0,0 → 1,44 |
// File: Application_18f4550.lkr |
// Use this linker for the USB application that will be self programmed by the HID bootloader. |
// The HID bootloader project itself uses the BootModified.18f4450.lkr file instead. |
// THIS LINKER SCRIPT HAS BEEN MODIFIED... This version is intended to be used |
// with the "PROGRAMMABLE_WITH_USB_HID_BOOTLOADER" bootloader. The HID |
// bootloader occupies memory ranges 0x000-0xFFF. In order for the code generated |
// by this project to work with the bootloader, the linker must not put any code |
// in the 0x00-0xFFF address range. |
// This linker script was originated from the 18f4550.lkr file provided by |
// the MCC18 distribution. |
LIBPATH . |
FILES c018i.o |
FILES clib.lib |
FILES p18f4550.lib |
CODEPAGE NAME=bootloader START=0x0 END=0xFFF PROTECTED |
CODEPAGE NAME=vectors START=0x1000 END=0x1029 PROTECTED |
CODEPAGE NAME=page START=0x102A END=0x7FFF |
CODEPAGE NAME=idlocs START=0x200000 END=0x200007 PROTECTED |
CODEPAGE NAME=config START=0x300000 END=0x30000D PROTECTED |
CODEPAGE NAME=devid START=0x3FFFFE END=0x3FFFFF PROTECTED |
CODEPAGE NAME=eedata START=0xF00000 END=0xF000FF PROTECTED |
ACCESSBANK NAME=accessram START=0x0 END=0x5F |
DATABANK NAME=gpr0 START=0x60 END=0xFF |
DATABANK NAME=gpr1 START=0x100 END=0x1FF |
DATABANK NAME=gpr2 START=0x200 END=0x2FF |
DATABANK NAME=gpr3 START=0x300 END=0x3FF |
DATABANK NAME=usb4 START=0x400 END=0x4FF PROTECTED |
DATABANK NAME=usb5 START=0x500 END=0x5FF PROTECTED |
DATABANK NAME=usb6 START=0x600 END=0x6FF PROTECTED |
DATABANK NAME=usb7 START=0x700 END=0x7FF PROTECTED |
ACCESSBANK NAME=accesssfr START=0xF60 END=0xFFF PROTECTED |
SECTION NAME=CONFIG ROM=config |
STACK SIZE=0x100 RAM=gpr3 |
SECTION NAME=USB_VARS RAM=usb4 |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/rm18f4550 - MCHPUSB Bootload.lkr |
---|
0,0 → 1,37 |
// FileName: rm18f4550.lkr |
// Sample linker command file for 18F4550 with Bootloader |
// |
//Change History: |
// Rev Date Description |
// 1.0 10/30/2004 Initial release |
LIBPATH . |
FILES c018i.o |
FILES clib.lib |
FILES p18f4550.lib |
CODEPAGE NAME=boot START=0x0 END=0x7FF PROTECTED |
CODEPAGE NAME=vectors START=0x800 END=0x0x829 PROTECTED |
CODEPAGE NAME=page START=0x82A END=0x7FFF |
CODEPAGE NAME=idlocs START=0x200000 END=0x200007 PROTECTED |
CODEPAGE NAME=config START=0x300000 END=0x30000D PROTECTED |
CODEPAGE NAME=devid START=0x3FFFFE END=0x3FFFFF PROTECTED |
CODEPAGE NAME=eedata START=0xF00000 END=0xF000FF PROTECTED |
ACCESSBANK NAME=accessram START=0x0 END=0x5F |
DATABANK NAME=gpr0 START=0x60 END=0xFF |
DATABANK NAME=gpr1 START=0x100 END=0x1FF |
DATABANK NAME=gpr2 START=0x200 END=0x2FF |
DATABANK NAME=gpr3 START=0x300 END=0x3FF |
DATABANK NAME=usb4 START=0x400 END=0x4FF PROTECTED |
DATABANK NAME=usb5 START=0x500 END=0x5FF PROTECTED |
DATABANK NAME=usb6 START=0x600 END=0x6FF PROTECTED |
DATABANK NAME=usb7 START=0x700 END=0x7FF PROTECTED |
ACCESSBANK NAME=accesssfr START=0xF60 END=0xFFF PROTECTED |
SECTION NAME=CONFIG ROM=config |
STACK SIZE=0x100 RAM=gpr3 |
SECTION NAME=USB_VARS RAM=usb4 |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/rm18f4550.lkr |
---|
0,0 → 1,37 |
// FileName: rm18f4550.lkr |
// Sample linker command file for 18F4550 with Bootloader |
// |
//Change History: |
// Rev Date Description |
// 1.0 10/30/2004 Initial release |
LIBPATH . |
FILES c018i.o |
FILES clib.lib |
FILES p18f4550.lib |
CODEPAGE NAME=boot START=0x0 END=0x7FF PROTECTED |
CODEPAGE NAME=vectors START=0x800 END=0x0x829 PROTECTED |
CODEPAGE NAME=page START=0x82A END=0x7FFF |
CODEPAGE NAME=idlocs START=0x200000 END=0x200007 PROTECTED |
CODEPAGE NAME=config START=0x300000 END=0x30000D PROTECTED |
CODEPAGE NAME=devid START=0x3FFFFE END=0x3FFFFF PROTECTED |
CODEPAGE NAME=eedata START=0xF00000 END=0xF000FF PROTECTED |
ACCESSBANK NAME=accessram START=0x0 END=0x5F |
DATABANK NAME=gpr0 START=0x60 END=0xFF |
DATABANK NAME=gpr1 START=0x100 END=0x1FF |
DATABANK NAME=gpr2 START=0x200 END=0x2FF |
DATABANK NAME=gpr3 START=0x300 END=0x3FF |
DATABANK NAME=usb4 START=0x400 END=0x4FF PROTECTED |
DATABANK NAME=usb5 START=0x500 END=0x5FF PROTECTED |
DATABANK NAME=usb6 START=0x600 END=0x6FF PROTECTED |
DATABANK NAME=usb7 START=0x700 END=0x7FF PROTECTED |
ACCESSBANK NAME=accesssfr START=0xF60 END=0xFFF PROTECTED |
SECTION NAME=CONFIG ROM=config |
STACK SIZE=0x100 RAM=gpr3 |
SECTION NAME=USB_VARS RAM=usb4 |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/temperature.c |
---|
0,0 → 1,412 |
/********************************************************************* |
* |
* Thermo Sensor |
* |
********************************************************************* |
* FileName: temperature.c |
* Dependencies: See INCLUDES section below |
* Processor: PIC18 |
* Compiler: C18 2.30.01+ |
* Company: Microchip Technology, Inc. |
* |
* Software License Agreement |
* |
* The software supplied herewith by Microchip Technology Incorporated |
* (the Company) for its PICmicro® Microcontroller is intended and |
* supplied to you, the Companys customer, for use solely and |
* exclusively on Microchip PICmicro Microcontroller products. The |
* software is owned by the Company and/or its supplier, and is |
* protected under applicable copyright laws. All rights are reserved. |
* Any use in violation of the foregoing restrictions may subject the |
* user to criminal sanctions under applicable laws, as well as to |
* civil liability for the breach of the terms and conditions of this |
* license. |
* |
* THIS SOFTWARE IS PROVIDED IN AN AS IS CONDITION. NO WARRANTIES, |
* WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED |
* TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
* PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, |
* IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR |
* CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
* |
********************************************************************/ |
/** I N C L U D E S **********************************************************/ |
#include "Compiler.h" |
#include "GenericTypeDefs.h" |
#include "HardwareProfile.h" |
#include "temperature.h" |
#if defined(__18CXX) |
#include <spi.h> |
#endif |
/** V A R I A B L E S ********************************************************/ |
#pragma udata |
unsigned int I2CStateVariable; // Used for keeping track of the I2C state |
// machine when using the HPC Explorer board's |
// I2C based TC74 temperature sensor. |
signed char TempAccumulator; // Used for averaging temperature samples |
signed char TempSave; |
WORD_VAL temperature; // Raw data format |
char tempString[10]; // Buffer for storing data in ASCII format |
/** P R I V A T E P R O T O T Y P E S ***************************************/ |
/** D E C L A R A T I O N S **************************************************/ |
#pragma code |
/****************************************************************************** |
* Function: void InitTempSensor(void) |
* |
* PreCondition: None |
* |
* Input: None |
* |
* Output: None |
* |
* Side Effects: None |
* |
* Overview: Initializes SPI interface & chip select line |
* |
* Note: None |
*****************************************************************************/ |
void InitTempSensor(void) |
{ |
#if defined(PICDEM_FS_USB) |
cs_temp_sensor = 1; |
tris_cs_temp_sensor = OUTPUT_PIN; |
OpenSPI(SPI_FOSC_64, MODE_11, SMPMID); |
// Initialize readable values - default to room temperature |
temperature.Val = 0x0C87; // 25 degree celsius |
UpdateCelsiusASCII(); |
#elif defined(PIC18F87J50_PIM) |
temperature.Val = 0x0C87; // 25 degree celsius |
UpdateCelsiusASCII(); |
//Need to initialize I2C Module to prepare for communication with |
//TC74 temperature sensor on the HPC Explorer board. |
mInitI2CPins(); // See io_cfg.h |
SSP1STAT = 0xC0; // Slew rate control disabled, SMBus |
SSP1CON1 = 0x08; // I2C Master mode |
SSP1CON2 = 0x00; |
SSP1ADD = 0x7D; // Just under 100kHz at 48MHz core frequency |
SSP1CON1bits.SSPEN = 1; // Enable MSSP module |
I2CStateVariable = 0; // Initial state for I2C state machine |
#endif |
}//end InitTempSensor |
/****************************************************************************** |
* Function: void AcquireTemperature(void) |
* |
* PreCondition: None |
* |
* Input: None |
* |
* Output: None |
* |
* Side Effects: None |
* |
* Overview: None |
* |
* Note: None |
*****************************************************************************/ |
BOOL AcquireTemperature(void) |
{ |
#if defined(PICDEM_FS_USB) |
//The PICDEM FS USB Demo Board uses a TC77 (13 bit) temperature sensor and |
//communicates with it through the SPI interface. |
cs_temp_sensor = 0; |
temperature.v[1] = ReadSPI(); |
temperature.v[0] = ReadSPI(); |
cs_temp_sensor = 1; |
if(temperature.bits.b2 == 0) |
return FALSE; |
#elif defined(__C30__) || defined(__C32__) |
//Create temp variables to store the conversion data |
float temp; |
//get ready to sample the A/D |
#if defined(__C30__) |
AD1CHS = 0x4; //MUXA uses AN4 |
AD1PCFGLbits.PCFG4 = 0; |
for(temp=0;temp<1000;temp++); //Sample delay |
// Get an ADC sample |
AD1CON1bits.SAMP = 1; //Start sampling |
for(temp=0;temp<1000;temp++); //Sample delay, conversion start automatically |
AD1CON1bits.SAMP = 0; //Start sampling |
for(temp=0;temp<1000;temp++); //Sample delay, conversion start automatically |
while(!AD1CON1bits.DONE); //Wait for conversion to complete |
#else |
AD1PCFGbits.PCFG4 = 0; |
AD1CON1 = 0x0000; // SAMP bit = 0 ends sampling ... |
// and starts converting |
AD1CHS = 0x00040000; // Connect RB4/AN4 as CH0 input .. |
// in this example RB2/AN2 is the input |
AD1CSSL = 0; |
AD1CON3 = 0x0002; // Manual Sample, Tad = internal 6 TPB |
AD1CON2 = 0; |
AD1CON1SET = 0x8000; // turn ADC ON |
AD1CON1SET = 0x0002; // start sampling ... |
for(temp=0;temp<1000;temp++); //Sample delay, conversion start automatically |
AD1CON1CLR = 0x0002; // start Converting |
while (!(AD1CON1 & 0x0001));// conversion done? |
#endif |
//convert the results to a float |
temp = (float)ADC1BUF0; |
// voltage = A2D_reading * 3.3v / 1024 |
temp *= 3.3; |
temp /= 1024; |
// align to 0C (subtracting -.65v) |
temp -= .55; |
//convert to TC77 style output and store to temperature |
temp *= 12800; |
temperature.Val = (WORD)temp; |
temperature.Val |= 0x7; |
//#elif defined(__C32__) |
//#warning "TODO" |
#elif defined(PIC18F87J50_PIM) // Uses TC74 (8 bit) |
//The PIC18F87J50 FS USB Plug-In Module (PIM) does not have a temperature |
//sensor, but there is a TC74 (8 bit) I2C based temperature sensor on the |
//HPC Explorer demo board. In order for this temperature demo code to do |
//anything useful, the PIM should be used in conjunction with the HPC Explorer. |
//The TC74 comes in 5V and 3.3V optimized versions. If a 5V part is run at |
//3.3V (as with the PIM installed), it may have relatively large offsets. |
return TRUE; // Don't need to do anything in this function, temperature |
// polling with the PIC18F87J50 FS USB Plug-In Module is |
// done with the PollTempOnHPCExplorer() function. |
// This is done so the I2C communication can be done with |
// a non-blocking approach. |
#elif defined(LOW_PIN_COUNT_USB_DEVELOPMENT_KIT) |
temperature.Val = 0x0000; |
return TRUE; |
#elif defined(PIC18F46J50_PIM) |
//Create temp variables to store the conversion data |
float temp; |
//get ready to sample the A/D |
ADCON0bits.CHS = 0x07; |
for(temp=0;temp<1000;temp++){} |
ADCON0bits.GO = 1; // Start AD conversion |
while(ADCON0bits.NOT_DONE); // Wait for conversion |
//convert the results to a float |
temp = (float)ADRES; |
// voltage = A2D_reading * 3.3v / 1024 |
temp *= 3.3; |
temp /= 1024; |
// align to 0C (subtracting -.65v) |
temp -= .55; |
//convert to TC77 style output and store to temperature |
temp *= 12800; |
temperature.Val = (WORD)temp; |
temperature.Val |= 0x7; |
return TRUE; |
#else |
#error "Unknown temperature acquire configuration. See AcquireTemperature function in __FILE__" |
#endif |
return TRUE; |
}//end AcquireTemperature |
/****************************************************************************** |
* Function: void PollTempOnHPCExplorer(void) |
* |
* PreCondition: None |
* |
* Input: None |
* |
* Output: Temperature data from TC74 on HPC Explorer, but formatted |
* like the TC77, stored in the "temperature" variable. |
* Side Effects: None |
* |
* Overview: None |
* |
* Note: None |
*****************************************************************************/ |
#if defined(PIC18F87J50_PIM) |
void PollTempOnHPCExplorer(void) |
{ |
//The PIC18F87J50 FS USB Plug-In Module (PIM) does not have a temperature |
//sensor, but there is a TC74 (8 bit) I2C based temperature sensor on the |
//HPC Explorer demo board. In order for this temperature demo code to do |
//anything useful, the PIM must be used in conjunction with the HPC Explorer. |
//The TC74 comes in 5V and 3.3V optimized versions. If a 5V part is run at |
//3.3V (as with the PIM installed), it may have relatively large offsets. |
#define TC74AddressWrite 0b10011010 // This is the default address for the TC74, use this for writes |
#define TC74AddressRead 0b10011011 // This is the default address for the TC74, use this for reads |
#define RTR 0x00 // This is the read temp command for TC74 |
// Should not use blocking functions in USB code. Therefore, these I2C |
// communications are done with a state machine as shown below. |
switch(I2CStateVariable) |
{ |
case 0x00: |
PIR1bits.SSP1IF = 0; |
SSP1CON2bits.SEN = 1; // Send Start Bit |
I2CStateVariable = 0x01; |
break; |
case 0x01: |
if(PIR1bits.SSP1IF == 0) {break;} |
PIR1bits.SSP1IF = 0; |
SSP1BUF = TC74AddressWrite; // Begin sending the actual address |
I2CStateVariable = 0x02; |
break; |
case 0x02: |
if(PIR1bits.SSP1IF == 0) {break;} |
PIR1bits.SSP1IF = 0; |
SSP1BUF = RTR; // Send command to select the TEMP register |
I2CStateVariable = 0x03; |
break; |
case 0x03: |
if(PIR1bits.SSP1IF == 0) {break;} |
PIR1bits.SSP1IF = 0; |
SSP1CON2bits.SEN = 1; // Send another start bit |
I2CStateVariable = 0x04; |
break; |
case 0x04: |
if(PIR1bits.SSP1IF == 0) {break;} |
PIR1bits.SSP1IF = 0; |
SSP1BUF = TC74AddressRead; // Send the address again, but this time "read" |
I2CStateVariable = 0x05; |
break; |
case 0x05: |
if(PIR1bits.SSP1IF == 0) {break;} |
PIR1bits.SSP1IF = 0; |
SSP1CON2bits.RCEN = 1; // Initiate read from device |
I2CStateVariable = 0x06; |
break; |
case 0x06: |
if(PIR1bits.SSP1IF == 0) {break;} |
PIR1bits.SSP1IF = 0; |
TempSave = SSP1BUF; // Finally got the result, need to save it |
SSP1CON2bits.ACKDT = 1; // Prepare I2C NACK handshake |
SSP1CON2bits.ACKEN = 1; // Send the acknowledge bit |
I2CStateVariable = 0x07; |
break; |
case 0x07: |
if(PIR1bits.SSP1IF == 0) {break;} |
PIR1bits.SSP1IF = 0; |
SSP1CON2bits.PEN = 1; // Now send a stop bit |
I2CStateVariable = 0x08; |
break; |
case 0x08: |
if(PIR1bits.SSP1IF == 0) {break;} |
PIR1bits.SSP1IF = 0; |
I2CStateVariable = 0x09; |
break; |
case 0x09: |
TempAccumulator = ((TempAccumulator + TempSave) / 2); // Get an average |
I2CStateVariable = 0x10; |
break; |
case 0x10: |
//Now format data like that of the TC77, which is what the PC side code expects, |
//since it was originally intended to be used with the TC77. |
temperature.v[1] = TempAccumulator; |
if(temperature.bits.b15 == 0) // == 0 when positive temperature |
{ |
temperature.Val = temperature.Val >> 1; |
temperature.bits.b15 = 0; // Positive temperature, upper MSb clear |
} |
else |
{ |
temperature.Val = temperature.Val >> 1; |
temperature.bits.b15 = 1; // Negative temperature, upper MSb set |
} |
temperature.bits.b0 = 1; // Lower three LSbs = 1 on TC74 format |
temperature.bits.b1 = 1; // Lower three LSbs = 1 on TC74 format |
temperature.bits.b2 = 1; // Lower three LSbs = 1 on TC74 format |
I2CStateVariable = 0x11; // Could go back to 0, but don't want to poll that fast |
break; |
case 0x5000: // This slows down the sample rate of the device. |
I2CStateVariable = 0x00; // The temp sensor itself only updates around 8 times/sec. |
break; |
default: |
I2CStateVariable++; |
break; |
}//end switch |
}//end PollTempOnHPCExplorer |
#endif |
/****************************************************************************** |
* Function: void UpdateCelsiusASCII(void) |
* |
* PreCondition: None |
* |
* Input: None |
* |
* Output: None |
* |
* Side Effects: None |
* |
* Overview: This routine converts data output to ASCII string |
* |
* Note: None |
*****************************************************************************/ |
void UpdateCelsiusASCII(void) |
{ |
WORD_VAL temp; |
BYTE i; |
temp.Val = temperature.Val >> 3; |
if(temp.bits.b12 == 0) |
{ |
temp.byte.HB &= 0x1F; |
tempString[0] = '+'; |
} |
else |
{ |
temp.byte.HB |= 0xE0; |
tempString[0] = '-'; |
temp.Val = temp.Val ^ 0xFFFF; // Negate |
temp.Val++; |
}//end if |
temp.Val = (temp.Val*10U) >> 4; // Turn into celsius xx.x |
/* Populate string */ |
for(i=4;i>0;i--) |
{ |
tempString[i] = (((char)(temp.Val % 10)) & 0x0F) | 0x30; |
temp.Val /= 10; |
}//end for |
/* Turn leading zeros into spaces */ |
if(tempString[1] == '0') |
{ |
tempString[1] = ' '; |
if(tempString[2] == '0') |
tempString[2] = ' '; |
}//end if |
/* Adjust decimal digit */ |
tempString[5] = tempString[4]; |
tempString[4]='.'; |
tempString[6]=0xF8; // Degree symbol |
tempString[7]='C'; |
tempString[8]='\r'; |
tempString[9]=0x00; // Null-Terminated |
}//end UpdateCelsiusASCII |
/** EOF temperature.c ********************************************************/ |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/temperature.h |
---|
0,0 → 1,51 |
/********************************************************************* |
* |
* Thermo Sensor with SPI(TM) Interface |
* |
********************************************************************* |
* FileName: temperature.h |
* Dependencies: See INCLUDES section below |
* Processor: PIC18 |
* Compiler: C18 2.30.01+ |
* Company: Microchip Technology, Inc. |
* |
* Software License Agreement |
* |
* The software supplied herewith by Microchip Technology Incorporated |
* (the Company) for its PICmicro® Microcontroller is intended and |
* supplied to you, the Companys customer, for use solely and |
* exclusively on Microchip PICmicro Microcontroller products. The |
* software is owned by the Company and/or its supplier, and is |
* protected under applicable copyright laws. All rights are reserved. |
* Any use in violation of the foregoing restrictions may subject the |
* user to criminal sanctions under applicable laws, as well as to |
* civil liability for the breach of the terms and conditions of this |
* license. |
* |
* THIS SOFTWARE IS PROVIDED IN AN AS IS CONDITION. NO WARRANTIES, |
* WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED |
* TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
* PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, |
* IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR |
* CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
* |
********************************************************************/ |
#ifndef TEMPERATURE_H |
#define TEMPERATURE_H |
/** E X T E R N S ************************************************************/ |
extern WORD_VAL temperature; |
extern char tempString[10]; |
/** P U B L I C P R O T O T Y P E S *****************************************/ |
void InitTempSensor(void); |
BOOL AcquireTemperature(void); |
void UpdateCelsiusASCII(void); |
#if defined(PIC18F87J50_PIM) |
void PollTempOnHPCExplorer(void); |
#else |
#define PollTempOnHPCExplorer() |
#endif |
#endif //TEMPERATURE_H |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/usb_config.h |
---|
0,0 → 1,125 |
/******************************************************************** |
FileName: usb_config.h |
Dependencies: Always: GenericTypeDefs.h, usb_device.h |
Situational: usb_function_hid.h, usb_function_cdc.h, usb_function_msd.h, etc. |
Processor: PIC18 or PIC24 USB Microcontrollers |
Hardware: The code is natively intended to be used on the following |
hardware platforms: PICDEM FS USB Demo Board, |
PIC18F87J50 FS USB Plug-In Module, or |
Explorer 16 + PIC24 USB PIM. The firmware may be |
modified for use on other USB platforms by editing the |
HardwareProfile.h file. |
Complier: Microchip C18 (for PIC18) or C30 (for PIC24) |
Company: Microchip Technology, Inc. |
Software License Agreement: |
The software supplied herewith by Microchip Technology Incorporated |
(the Company) for its PIC® Microcontroller is intended and |
supplied to you, the Companys customer, for use solely and |
exclusively on Microchip PIC Microcontroller products. The |
software is owned by the Company and/or its supplier, and is |
protected under applicable copyright laws. All rights are reserved. |
Any use in violation of the foregoing restrictions may subject the |
user to criminal sanctions under applicable laws, as well as to |
civil liability for the breach of the terms and conditions of this |
license. |
THIS SOFTWARE IS PROVIDED IN AN AS IS CONDITION. NO WARRANTIES, |
WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED |
TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, |
IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR |
CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
******************************************************************** |
File Description: |
Change History: |
Rev Date Description |
1.0 11/19/2004 Initial release |
2.1 02/26/2007 Updated for simplicity and to use common |
coding style |
*******************************************************************/ |
/********************************************************************* |
* Descriptor specific type definitions are defined in: usbd.h |
********************************************************************/ |
#ifndef USBCFG_H |
#define USBCFG_H |
/** DEFINITIONS ****************************************************/ |
#define USB_EP0_BUFF_SIZE 8 // Valid Options: 8, 16, 32, or 64 bytes. |
// Using larger options take more SRAM, but |
// does not provide much advantage in most types |
// of applications. Exceptions to this, are applications |
// that use EP0 IN or OUT for sending large amounts of |
// application related data. |
#define USB_MAX_NUM_INT 1 // For tracking Alternate Setting |
#define USB_MAX_EP_NUMBER 1 |
//Device descriptor - if these two definitions are not defined then |
// a ROM USB_DEVICE_DESCRIPTOR variable by the exact name of device_dsc |
// must exist. |
#define USB_USER_DEVICE_DESCRIPTOR &device_dsc |
#define USB_USER_DEVICE_DESCRIPTOR_INCLUDE extern ROM USB_DEVICE_DESCRIPTOR device_dsc |
//Configuration descriptors - if these two definitions do not exist then |
// a ROM BYTE *ROM variable named exactly USB_CD_Ptr[] must exist. |
#define USB_USER_CONFIG_DESCRIPTOR USB_CD_Ptr |
#define USB_USER_CONFIG_DESCRIPTOR_INCLUDE extern ROM BYTE *ROM USB_CD_Ptr[] |
//Make sure only one of the below "#define USB_PING_PONG_MODE" |
//is uncommented. |
//#define USB_PING_PONG_MODE USB_PING_PONG__NO_PING_PONG |
#define USB_PING_PONG_MODE USB_PING_PONG__FULL_PING_PONG |
//#define USB_PING_PONG_MODE USB_PING_PONG__EP0_OUT_ONLY |
//#define USB_PING_PONG_MODE USB_PING_PONG__ALL_BUT_EP0 //NOTE: This mode is not supported in PIC18F4550 family rev A3 devices |
#define USB_POLLING |
//#define USB_INTERRUPT |
/* Parameter definitions are defined in usb_device.h */ |
#define USB_PULLUP_OPTION USB_PULLUP_ENABLE |
//#define USB_PULLUP_OPTION USB_PULLUP_DISABLED |
#define USB_TRANSCEIVER_OPTION USB_INTERNAL_TRANSCEIVER |
//External Transceiver support is not available on all product families. Please |
// refer to the product family datasheet for more information if this feature |
// is available on the target processor. |
//#define USB_TRANSCEIVER_OPTION USB_EXTERNAL_TRANSCEIVER |
#define USB_SPEED_OPTION USB_FULL_SPEED |
//#define USB_SPEED_OPTION USB_LOW_SPEED //(not valid option for PIC24F devices) |
#define USB_SUPPORT_DEVICE |
#define USB_NUM_STRING_DESCRIPTORS 4 |
//#define USB_INTERRUPT_LEGACY_CALLBACKS |
#define USB_ENABLE_ALL_HANDLERS |
//#define USB_ENABLE_SUSPEND_HANDLER |
//#define USB_ENABLE_WAKEUP_FROM_SUSPEND_HANDLER |
//#define USB_ENABLE_SOF_HANDLER |
//#define USB_ENABLE_ERROR_HANDLER |
//#define USB_ENABLE_OTHER_REQUEST_HANDLER |
//#define USB_ENABLE_SET_DESCRIPTOR_HANDLER |
//#define USB_ENABLE_INIT_EP_HANDLER |
//#define USB_ENABLE_EP0_DATA_HANDLER |
//#define USB_ENABLE_TRANSFER_COMPLETE_HANDLER |
/** DEVICE CLASS USAGE *********************************************/ |
#define USB_USE_GEN |
/** ENDPOINTS ALLOCATION *******************************************/ |
/* Generic */ |
#define USBGEN_EP_SIZE 64 |
#define USBGEN_EP_NUM 1 |
/** DEFINITIONS ****************************************************/ |
#endif //USBCFG_H |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/usb_descriptors.c |
---|
0,0 → 1,265 |
/******************************************************************** |
FileName: usb_descriptors.c |
Dependencies: See INCLUDES section |
Processor: PIC18 or PIC24 USB Microcontrollers |
Hardware: The code is natively intended to be used on the following |
hardware platforms: PICDEM FS USB Demo Board, |
PIC18F87J50 FS USB Plug-In Module, or |
Explorer 16 + PIC24 USB PIM. The firmware may be |
modified for use on other USB platforms by editing the |
HardwareProfile.h file. |
Complier: Microchip C18 (for PIC18) or C30 (for PIC24) |
Company: Microchip Technology, Inc. |
Software License Agreement: |
The software supplied herewith by Microchip Technology Incorporated |
(the Company) for its PIC® Microcontroller is intended and |
supplied to you, the Companys customer, for use solely and |
exclusively on Microchip PIC Microcontroller products. The |
software is owned by the Company and/or its supplier, and is |
protected under applicable copyright laws. All rights are reserved. |
Any use in violation of the foregoing restrictions may subject the |
user to criminal sanctions under applicable laws, as well as to |
civil liability for the breach of the terms and conditions of this |
license. |
THIS SOFTWARE IS PROVIDED IN AN AS IS CONDITION. NO WARRANTIES, |
WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED |
TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, |
IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR |
CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
********************************************************************* |
-usb_descriptors.c- |
------------------------------------------------------------------- |
Filling in the descriptor values in the usb_descriptors.c file: |
------------------------------------------------------------------- |
[Device Descriptors] |
The device descriptor is defined as a USB_DEVICE_DESCRIPTOR type. |
This type is defined in usb_ch9.h Each entry into this structure |
needs to be the correct length for the data type of the entry. |
[Configuration Descriptors] |
The configuration descriptor was changed in v2.x from a structure |
to a BYTE array. Given that the configuration is now a byte array |
each byte of multi-byte fields must be listed individually. This |
means that for fields like the total size of the configuration where |
the field is a 16-bit value "64,0," is the correct entry for a |
configuration that is only 64 bytes long and not "64," which is one |
too few bytes. |
The configuration attribute must always have the _DEFAULT |
definition at the minimum. Additional options can be ORed |
to the _DEFAULT attribute. Available options are _SELF and _RWU. |
These definitions are defined in the usb_device.h file. The |
_SELF tells the USB host that this device is self-powered. The |
_RWU tells the USB host that this device supports Remote Wakeup. |
[Endpoint Descriptors] |
Like the configuration descriptor, the endpoint descriptors were |
changed in v2.x of the stack from a structure to a BYTE array. As |
endpoint descriptors also has a field that are multi-byte entities, |
please be sure to specify both bytes of the field. For example, for |
the endpoint size an endpoint that is 64 bytes needs to have the size |
defined as "64,0," instead of "64," |
Take the following example: |
// Endpoint Descriptor // |
0x07, //the size of this descriptor // |
USB_DESCRIPTOR_ENDPOINT, //Endpoint Descriptor |
_EP02_IN, //EndpointAddress |
_INT, //Attributes |
0x08,0x00, //size (note: 2 bytes) |
0x02, //Interval |
The first two parameters are self-explanatory. They specify the |
length of this endpoint descriptor (7) and the descriptor type. |
The next parameter identifies the endpoint, the definitions are |
defined in usb_device.h and has the following naming |
convention: |
_EP<##>_<dir> |
where ## is the endpoint number and dir is the direction of |
transfer. The dir has the value of either 'OUT' or 'IN'. |
The next parameter identifies the type of the endpoint. Available |
options are _BULK, _INT, _ISO, and _CTRL. The _CTRL is not |
typically used because the default control transfer endpoint is |
not defined in the USB descriptors. When _ISO option is used, |
addition options can be ORed to _ISO. Example: |
_ISO|_AD|_FE |
This describes the endpoint as an isochronous pipe with adaptive |
and feedback attributes. See usb_device.h and the USB |
specification for details. The next parameter defines the size of |
the endpoint. The last parameter in the polling interval. |
------------------------------------------------------------------- |
Adding a USB String |
------------------------------------------------------------------- |
A string descriptor array should have the following format: |
rom struct{byte bLength;byte bDscType;word string[size];}sdxxx={ |
sizeof(sdxxx),DSC_STR,<text>}; |
The above structure provides a means for the C compiler to |
calculate the length of string descriptor sdxxx, where xxx is the |
index number. The first two bytes of the descriptor are descriptor |
length and type. The rest <text> are string texts which must be |
in the unicode format. The unicode format is achieved by declaring |
each character as a word type. The whole text string is declared |
as a word array with the number of characters equals to <size>. |
<size> has to be manually counted and entered into the array |
declaration. Let's study this through an example: |
if the string is "USB" , then the string descriptor should be: |
(Using index 02) |
rom struct{byte bLength;byte bDscType;word string[3];}sd002={ |
sizeof(sd002),DSC_STR,'U','S','B'}; |
A USB project may have multiple strings and the firmware supports |
the management of multiple strings through a look-up table. |
The look-up table is defined as: |
rom const unsigned char *rom USB_SD_Ptr[]={&sd000,&sd001,&sd002}; |
The above declaration has 3 strings, sd000, sd001, and sd002. |
Strings can be removed or added. sd000 is a specialized string |
descriptor. It defines the language code, usually this is |
US English (0x0409). The index of the string must match the index |
position of the USB_SD_Ptr array, &sd000 must be in position |
USB_SD_Ptr[0], &sd001 must be in position USB_SD_Ptr[1] and so on. |
The look-up table USB_SD_Ptr is used by the get string handler |
function. |
------------------------------------------------------------------- |
The look-up table scheme also applies to the configuration |
descriptor. A USB device may have multiple configuration |
descriptors, i.e. CFG01, CFG02, etc. To add a configuration |
descriptor, user must implement a structure similar to CFG01. |
The next step is to add the configuration descriptor name, i.e. |
cfg01, cfg02,.., to the look-up table USB_CD_Ptr. USB_CD_Ptr[0] |
is a dummy place holder since configuration 0 is the un-configured |
state according to the definition in the USB specification. |
********************************************************************/ |
/********************************************************************* |
* Descriptor specific type definitions are defined in: |
* usb_device.h |
* |
* Configuration options are defined in: |
* usb_config.h |
********************************************************************/ |
#ifndef __USB_DESCRIPTORS_C |
#define __USB_DESCRIPTORS_C |
/** INCLUDES *******************************************************/ |
/* |
#include "GenericTypeDefs.h" |
#include "Compiler.h" |
#include "usb_config.h" |
#include "USB/usb_device.h" |
*/ |
#include "./USB/usb.h" |
/** CONSTANTS ******************************************************/ |
#if defined(__18CXX) |
#pragma romdata |
#endif |
/* Device Descriptor */ |
ROM USB_DEVICE_DESCRIPTOR device_dsc= |
{ |
0x12, // Size of this descriptor in bytes |
USB_DESCRIPTOR_DEVICE, // DEVICE descriptor type |
0x0200, // USB Spec Release Number in BCD format |
0x00, // Class Code |
0x00, // Subclass code |
0x00, // Protocol code |
USB_EP0_BUFF_SIZE, // Max packet size for EP0, see usb_config.h |
0x16C0, // Vendor ID VOTI AVR USB device |
0x05DC, // Product ID: obdev's free PID |
0x0000, // Device release number in BCD format |
0x01, // Manufacturer string index |
0x02, // Product string index |
0x03, // Device serial number string index |
0x01 // Number of possible configurations |
}; |
/* Configuration 1 Descriptor */ |
ROM BYTE configDescriptor1[]={ |
/* Configuration Descriptor */ |
0x09,//sizeof(USB_CFG_DSC), // Size of this descriptor in bytes |
USB_DESCRIPTOR_CONFIGURATION, // CONFIGURATION descriptor type |
0x20,0x00, // Total length of data for this cfg |
1, // Number of interfaces in this cfg |
1, // Index value of this configuration |
0, // Configuration string index |
_DEFAULT | _SELF, // Attributes, see usb_device.h |
50, // Max power consumption (2X mA) |
/* Interface Descriptor */ |
0x09,//sizeof(USB_INTF_DSC), // Size of this descriptor in bytes |
USB_DESCRIPTOR_INTERFACE, // INTERFACE descriptor type |
0, // Interface Number |
0, // Alternate Setting Number |
2, // Number of endpoints in this intf |
0x00, // Class code |
0x00, // Subclass code |
0x00, // Protocol code |
0, // Interface string index |
/* Endpoint Descriptor */ |
0x07, /*sizeof(USB_EP_DSC)*/ |
USB_DESCRIPTOR_ENDPOINT, //Endpoint Descriptor |
_EP01_OUT, //EndpointAddress |
_BULK, //Attributes |
USBGEN_EP_SIZE,0x00, //size |
1, //Interval |
0x07, /*sizeof(USB_EP_DSC)*/ |
USB_DESCRIPTOR_ENDPOINT, //Endpoint Descriptor |
_EP01_IN, //EndpointAddress |
_BULK, //Attributes |
USBGEN_EP_SIZE,0x00, //size |
1 //Interval |
}; |
//Language code string descriptor |
ROM struct{BYTE bLength;BYTE bDscType;WORD string[1];}sd000={ |
sizeof(sd000),USB_DESCRIPTOR_STRING,{0x0409}}; |
//Manufacturer string descriptor |
ROM struct{BYTE bLength;BYTE bDscType;WORD string[12];}sd001={ |
sizeof(sd001),USB_DESCRIPTOR_STRING, |
{'w','w','w','.','o','b','d','e','v','.', |
'a','t'}}; |
//Product string descriptor |
ROM struct{BYTE bLength;BYTE bDscType;WORD string[10];}sd002={ |
sizeof(sd002),USB_DESCRIPTOR_STRING, |
{'D','G','8','S','A','Q','-','I','2','C'}}; |
//Serial Number string descriptor |
ROM struct{BYTE bLength;BYTE bDscType;WORD string[9];}sd003={ |
sizeof(sd003),USB_DESCRIPTOR_STRING, |
{'T','F','3','L','J','-','1','.','0'}}; |
//Array of configuration descriptors |
ROM BYTE *ROM USB_CD_Ptr[]= |
{ |
(ROM BYTE *ROM)&configDescriptor1 |
}; |
//Array of string descriptors |
ROM BYTE *ROM USB_SD_Ptr[]= |
{ |
(ROM BYTE *ROM)&sd000, |
(ROM BYTE *ROM)&sd001, |
(ROM BYTE *ROM)&sd002, |
(ROM BYTE *ROM)&sd003 |
}; |
/** EOF usb_descriptors.c ***************************************************/ |
#endif |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/usbavrcmd.h |
---|
0,0 → 1,87 |
//************************************************************************ |
//** |
//** Project......: Firmware USB AVR Si570 controler. |
//** |
//** Platform.....: ATtiny45 @ 16.5 MHz |
//** |
//** Licence......: This software is freely available for non-commercial |
//** use - i.e. for research and experimentation only! |
//** |
//** Programmer...: F.W. Krom, PE0FKO |
//** |
//** Description..: USB commando codes |
//** |
//** History......: V15.12: First version |
//** |
//************************************************************************** |
// |
//#define CMD_ECHO_WORD 0x00 |
#define CMD_GET_VERSION 0x00 |
#define CMD_SET_DDR 0x01 |
#define CMD_GET_PIN 0x02 |
#define CMD_GET_PORT 0x03 |
#define CMD_SET_PORT 0x04 |
// 0x05 // Used in old V1.4 |
// 0x06 // Used in old V1.4 |
// 0x07 // Used in old V1.4 |
// 0x08 // Used in old V1.4 |
// 0x09 // Used in old V1.4 |
// 0x0A // Used in old V1.4 |
// 0x0B // Used in old V1.4 |
// 0x0C // Used in old V1.4 |
#define CMD_REBOOT 0x0F |
// 0x10 // Used in old V1.4 |
// 0x11 // Used in old V1.4 |
#define CMD_SET_IO 0x15 |
#define CMD_GET_IO 0x16 |
#define CMD_SET_FILTER 0x17 |
#define CMD_SET_RX_BAND_FILTER 0x18 // V15.12 |
#define CMD_GET_RX_BAND_FILTER 0x19 // V15.12 |
#define CMD_SET_TX_BAND_FILTER 0x1A // MOBO Only |
#define CMD_GET_TX_BAND_FILTER 0x1B // MOBO Only |
#define CMD_SET_SI570 0x20 // Write byte to Si570 register |
// 0x21 // Used in old V1.4 |
// 0x22 // Used in old V1.4 |
// 0x23 // Used in old V1.4 |
#define CMD_SET_FREQ_REG 0x30 |
#define CMD_SET_LO_SM 0x31 |
#define CMD_SET_FREQ 0x32 |
#define CMD_SET_XTAL 0x33 |
#define CMD_SET_STARTUP 0x34 |
#define CMD_SET_PPM 0x35 |
// 0x36 // Used in old V2.0 |
// 0x37 // Used in old V2.0 |
// 0x38 // Used in old V2.0 |
#define CMD_GET_LO_SM 0x39 |
#define CMD_GET_FREQ 0x3a |
#define CMD_GET_PPM 0x3b |
#define CMD_GET_STARTUP 0x3c |
#define CMD_GET_XTAL 0x3d |
#define CMD_GET_REGS 0x3e |
#define CMD_GET_SI570 0x3f |
#define CMD_GET_I2C_ERR 0x40 |
#define CMD_SET_I2C_ADDR 0x41 |
#define CMD_GET_CPU_TEMP 0x42 // |
#define CMD_SET_USRP1 0x50 |
#define CMD_GET_CW_KEY 0x51 |
// 0x52 // Used in old V2.0 |
// 0x53 // Used in old V2.0 |
// 0x54 // Used in old V2.0 |
// Mobo command's |
#define CMD_GET_FW_FEATURE 0x60 // Firmware Feature select |
#define CMD_GET_ADC_INPUTS 0x61 // Read analog inputs (Temp, PA current, P_out, P_ref, Vdd) |
#define CMD_RM_PA_HIGH_TEMP 0x64 // Read/Modify the PA High Temperature limit |
#define CMD_RM_PA_BIAS 0x65 // Read/Modify PA bias setting related values, 5 items |
#define CMD_RM_PA_SWR 0x66 // Read/Modify SWR measurement and SWR alarm related values 4 items |
#define CMD_RM_ROTARY 0x67 // Read/Modify Rotatry Encoder Resolution |
#define CMD_SET_BYTE_GPIO 0x6e // Write a Byte to (PCF8584) GPIO Extender |
#define CMD_GET_BYTE_GPIO 0x6f // Read a Byte from (PCF8584) GPIO Extender |
// 0xEE // Used in old V2.0 |
// 0xEF // Used in old V2.0 |
// 0xFF // Used in old V2.0 |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/user.bak |
---|
0,0 → 1,197 |
/********************************************************************* |
* |
* Microchip USB C18 Firmware Version 1.2 |
* |
********************************************************************* |
* FileName: user.h |
* Dependencies: See INCLUDES section below |
* Processor: PIC18 |
* Compiler: C18 3.11+ |
* Company: Microchip Technology, Inc. |
* |
* Software License Agreement |
* |
* The software supplied herewith by Microchip Technology Incorporated |
* (the Company) for its PICmicro® Microcontroller is intended and |
* supplied to you, the Companys customer, for use solely and |
* exclusively on Microchip PICmicro Microcontroller products. The |
* software is owned by the Company and/or its supplier, and is |
* protected under applicable copyright laws. All rights are reserved. |
* Any use in violation of the foregoing restrictions may subject the |
* user to criminal sanctions under applicable laws, as well as to |
* civil liability for the breach of the terms and conditions of this |
* license. |
* |
* THIS SOFTWARE IS PROVIDED IN AN AS IS CONDITION. NO WARRANTIES, |
* WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED |
* TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
* PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, |
* IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR |
* CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
* |
* Author Date Comment |
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
* Rawin Rojvanit 11/19/04 Original. |
* Rawin Rojvanit 05/14/07 Minor updates. |
********************************************************************/ |
#ifndef PICDEM_FS_DEMO_H |
#define PICDEM_FS_DEMO_H |
/** I N C L U D E S **********************************************************/ |
/** D E F I N I T I O N S ****************************************************/ |
// For custom LPF switchover points |
#define ALEX |
//#define K5OOR |
//#define MARC |
// YAS is defined in the HardwareProfile - UBW.h, if needed |
#if defined(YAS) |
#define NUM_BPF 8 |
#else |
#define NUM_BPF 4 |
#endif |
#define INIT_SI570_ON_STARTUP |
#define VERSION_MAJOR 16 |
#define VERSION_MINOR 04 |
#define DEFAULT_I2C_ADDRESS 0x55 |
#define PCF8574 0x39 // A2 A1 A0 -> 0 0 1 |
#define F_CAL_DONE 0 // EEPROM position of F_CAL_DONE flag. 4 bytes follow. |
#define F_CAL_DONE_VALUE 0x55 |
#define DEFAULT_FCRYST 114.285 |
//#if defined(UBW) |
#define F_INIT_FREQ 5 // 4 bytes follow |
//#elif defined(UBW32) |
//#define F_INIT_FREQ 2 // fcryst 4 bytes all stored in one 32 bit slot |
#endif |
#define F_INIT_FREQ_VALUE 0x55 |
#define DEFAULT_INIT_FREQ 56.32 |
#if defined(UBW) |
#define F_SMOOTH 10 // 2 bytes follow |
#elif defined(UBW32) |
#define F_SMOOTH 4 // 1 slot follow |
#endif |
#define F_SMOOTH_VALUE 0x55 |
#define DEFAULT_SMOOTH 3500 // ppm |
#define F_SUB_MUL_VALUE 0x55 |
#define DEFAULT_SUB 0.0 |
#define DEFAULT_MUL 1.0 |
#if defined(UBW) |
#define F_SUB_MUL 13 // 8 bytes follow |
#elif defined(UBW32) |
#define F_SUB_MUL 6 // 2 slots follow |
#endif |
#if defined(UBW) |
#define F_CROSS_OVER 22 // 32 bytes follow |
#elif defined(UBW32) |
#define F_CROSS_OVER 9 // 16 words stored in 16 (unsigned int) slots |
#endif |
#define F_CROSS_OVER_VALUE 0x55 |
#if defined(UBW) |
#define F_BLINK_LED 55 |
#elif defined(UBW32) |
#define F_BLINK_LED 26 |
#endif |
/** S T R U C T U R E S ******************************************************/ |
extern BYTE i2c_adr; |
extern BYTE command; |
extern BYTE replybuf[8]; |
extern WORD wCount; |
#define COMMAND_BUFFER_SIZE 16 |
#define DATA_PACKET_SIZE 6 |
typedef struct COMMAND_BUFFER |
{ |
BYTE command; |
WORD wCount; |
BYTE data[DATA_PACKET_SIZE]; |
} COMMAND_BUFFER_t; |
extern COMMAND_BUFFER_t command_buffer[COMMAND_BUFFER_SIZE]; |
extern BYTE current_command_in, current_command_out; |
extern BYTE command_count; |
extern double set_frequency; |
extern unsigned char tempBuf[8]; |
typedef union _avr_freq |
{ |
unsigned long qw; |
unsigned char bytes[4]; |
} avr_freq_t; |
extern avr_freq_t avr_freq, fcryst_freq; //frequency [MHz]*2^21 |
// fcryst freq [MHz]*2^24 |
extern avr_freq_t f_mul; // mul for set freq in 11.21 format |
typedef union _offset |
{ |
long qw; // signed offset in 11.21 format |
unsigned char bytes[4]; |
} offset_t; |
extern offset_t f_sub; |
extern unsigned char registers[6]; |
extern BYTE abpf_flag; |
extern double Smooth_double; |
extern double fcryst_double; |
extern WORD_VAL FilterCrossOver[8]; // 11.5 bit value Mhz |
extern float FilterSwitchOver[7]; |
extern WORD_VAL LPFCrossOver[8]; |
extern float LPFSwitchOver[7]; |
/** P U B L I C P R O T O T Y P E S *****************************************/ |
void UserInit(void); |
void ProcessIO(void); |
void Set_Freq_Handler(void); |
void Set_Register_Handler(void); |
void Set_Cal_Handler(void); |
void Set_Init_Freq_Handler(void); |
void Set_Smooth_Handler(void); |
void Set_Sub_Mul_Handler(void); |
void Reset_Si570(void); |
void Freeze (void); |
void Unfreeze (void); |
void Prep_rd (unsigned short); |
void WriteBk (void); |
void NewF (void); |
void SetNewFreq(void); |
void ReadRegs(void); |
void ReadStartUpConfiguration(void); |
void RunFreqProg(double); |
void SetFrequency(double); |
void Set_BPF(float); |
void Set_LPF(float); |
float Cross2Switch(WORD_VAL); |
WORD_VAL Switch2Cross(float); |
double Freq_From_Register(double); |
void Read_Command_Into_Buffer(void); |
void USBCheckUserRequest(void); |
void USBCheckUBWRequest(void); |
#endif //PICDEM_FS_DEMO_H |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/user.c |
---|
0,0 → 1,1278 |
/******************************************************************** |
FileName: user.c |
Dependencies: See INCLUDES section |
Processor: PIC18 or PIC24 USB Microcontrollers |
Hardware: The code is natively intended to be used on the following |
hardware platforms: PICDEM FS USB Demo Board, |
PIC18F87J50 FS USB Plug-In Module, or |
Explorer 16 + PIC24 USB PIM. The firmware may be |
modified for use on other USB platforms by editing the |
HardwareProfile.h file. |
Complier: Microchip C18 (for PIC18) or C30 (for PIC24) |
* Company: Microchip Technology, Inc. |
* |
* Software License Agreement |
The software supplied herewith by Microchip Technology Incorporated |
(the Company) for its PIC® Microcontroller is intended and |
supplied to you, the Companys customer, for use solely and |
exclusively on Microchip PIC Microcontroller products. The |
software is owned by the Company and/or its supplier, and is |
protected under applicable copyright laws. All rights are reserved. |
* Any use in violation of the foregoing restrictions may subject the |
* user to criminal sanctions under applicable laws, as well as to |
* civil liability for the breach of the terms and conditions of this |
* license. |
* |
* THIS SOFTWARE IS PROVIDED IN AN AS IS CONDITION. NO WARRANTIES, |
* WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED |
* TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
* PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, |
* IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR |
CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
******************************************************************** |
File Description: |
Change History: |
Rev Date Description |
1.0 11/19/2004 Initial release |
2.1 02/26/2007 Updated for simplicity and to use common |
coding style |
********************************************************************/ |
/** INCLUDES *******************************************************/ |
#include "usb.h" |
#include "HardwareProfile.h" |
#include "user.h" |
#include "usbavrcmd.h" |
#include <math.h> |
#include <stdlib.h> |
#include <string.h> |
#include <ctype.h> |
#if defined(__18CXX) |
#include <delays.h> |
#include <i2c.h> |
#include <eep.h> |
#elif defined(__PIC32MX__) |
#include <peripheral/i2c.h> |
#include <dee_emulation/dee_emulation_pic32.h> |
#endif |
#if defined (UBW) |
#pragma romdata dataEEPROM=0xF00000 |
// F_CAL_DONE, 4 bytes cal data, F_INIT_FREQ, 4 bytes freq, F_SMOOTH, 2 bytes |
// F_SUB_MUL, 4 bytes sub and 4 bytes mul |
// F_CROSS_OVER, 16 bytes or 8 words of 7 cross over points and 1 flag for BPF |
// followed by 16 bytes or 8 words of 7 cross over points and 1 flag for LPF |
// F_BLINK_LED, 1 byte boolean |
rom unsigned char init_data[] = {0xff, 0,0,0,0, 0xff, 0,0,0,0, 0xff, 0,0, |
0xff, 0,0,0,0,0,0,0,0, |
0xff, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, |
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, |
TRUE}; |
#endif |
/** V A R I A B L E S ********************************************************/ |
#pragma udata |
BYTE old_SW; |
BYTE i2c_adr; |
BYTE command; |
BYTE replybuf[8]; |
WORD wCount; |
BYTE abpf_flag; |
COMMAND_BUFFER_t command_buffer[COMMAND_BUFFER_SIZE]; |
BYTE current_command_in, current_command_out; |
BYTE command_count; |
avr_freq_t avr_freq, fcryst_freq; // avr freq [MHz]*2^21 |
// fcryst freq [Mhz]*2^24 |
unsigned short R137, R135 = 0; |
unsigned char registers[6]; |
unsigned char tempBuf[8]; |
unsigned char counter; |
double delta_rfreq; |
double rfreq, Old_rfreq; |
double fcryst_double, Old_freq_double, Smooth_double; |
double set_frequency; |
avr_freq_t f_mul; |
offset_t f_sub; |
unsigned char validCombo; |
#if defined(__18F14K50) || defined(__18F13K50) || defined(__18LF14K50) || defined(__18LF13K50) |
#pragma udata usbram2 |
#elif defined(__18F2455) || defined(__18F2550) || defined(__18F4455) || defined(__18F4550)\ |
|| defined(__18F4450) || defined(__18F2450)\ |
|| defined(__18F2458) || defined(__18F2453) || defined(__18F4558) || defined(__18F4553) |
#pragma udata USB_VARIABLES=0x500 |
#else |
#pragma udata |
#endif |
#pragma udata |
BOOL blinkStatusValid = TRUE; |
/** P R I V A T E P R O T O T Y P E S ***************************************/ |
void BlinkUSBStatus(void); |
BOOL SwitchIsPressed(void); |
void ServiceRequests(void); |
/** D E C L A R A T I O N S **************************************************/ |
#pragma code |
float Cross2Switch(WORD_VAL val){ // convert from 11.5 bit format in [Mhz] |
float whole, fraction; |
whole = (float) (val.Val >> 5); |
fraction = ((float) (val.Val & 0x001f)) / 32.0; |
return (whole + fraction); |
} |
WORD_VAL Switch2Cross(float val){ // convert from float to 11.5 bit format [Mhz] |
WORD_VAL w; |
unsigned int i; |
i = val; |
w.Val = i * 32.0; |
w.Val += (val - (float) i) * 32.0; |
return (w); |
} |
void UserInit(void) |
{ |
WORD_VAL w; |
//#if defined (UBW) |
// unsigned char i; |
//#elif |
unsigned int i; |
unsigned int value; |
//#endif |
#if defined(UBW) |
// Port A - RA0 BPF_S0, RA1 BPF_S1, RA2 RXTX, RA3-5 LPF0-2 |
LATA = 0x00; |
TRISA = 0x00; // 00000000 |
// Turn all analog inputs into digital inputs |
ADCON1 = 0x0F; |
// Turn off the ADC |
ADCON0bits.ADON = 0; |
CMCON = 0x07; // Comparators as digital inputs |
// RB0-1 for i2c, RB6-7 Paddle dit/dah, RB2-5 LPF 3-6 |
LATB = 0x00; |
TRISB = 0xc3; // 11000011 |
INTCON2bits.RBPU = 0; // enable RB weak internal pullup |
// Make all of PORTC inputs |
LATC = 0x00; |
TRISC = 0xFF; |
mInitAllLEDs(); |
mInitSwitch(); |
old_SW = UserSW; |
#elif defined(UBW32) |
// gO through each I/O register, setting them all to digital i/o |
// and making none of them open drain and turning off all pullups and |
// setting all of the latches to zero. We have PORTA through PORTG on |
// this chip. That's 7 total. |
LATA = 0x0000; |
TRISA = 0x0000; |
ODCA = 0x0000; |
LATB = 0x0000; |
TRISB = 0x0000; |
ODCB = 0x0000; |
LATC = 0x0000; |
TRISC = 0x0000; |
ODCC = 0x0000; |
LATD = 0x0000; |
TRISD = 0x0000; |
ODCD = 0x0000; |
LATE = 0x0000; |
TRISE = 0x0000; |
ODCE = 0x0000; |
LATF = 0x0000; |
TRISF = 0x0030; // RF4-5 paddle input |
ODCF = 0x0000; |
CNPUE = 0x060000; // Pull up on CNPUE17-18, corresponding to RF4-5 |
LATG = 0x0000; |
TRISG = 0x0000; |
ODCG = 0x0000; |
//Initialize all of the LED pins |
mInitAllLEDs(); |
mInitAllSwitches(); |
old_SW = UserSW; |
// Initialize Data EEPROM Emulation |
if (DataEEInit()) { |
mLED_4_On(); // Error occured |
} |
else { |
mLED_4_Off(); |
}; |
#endif |
i2c_adr = DEFAULT_I2C_ADDRESS; |
// check for previous calibration, which sets fcryst, the actual crystal freq |
#if defined (UBW) |
if (Read_b_eep(F_CAL_DONE) != F_CAL_DONE_VALUE){ // cal not done before, use default |
fcryst_freq.qw = (double) DEFAULT_FCRYST * (double) (1L << 24); // 114.285 Mhz |
} |
else { // cal done before, read into fcryst |
for (i=0; i<4; i++) fcryst_freq.bytes[i] = Read_b_eep(i + F_CAL_DONE +1); |
}; |
#elif defined (UBW32) |
DataEERead(&value, F_CAL_DONE); |
if ( value != F_CAL_DONE_VALUE){ // cal not done before, use default |
fcryst_freq.qw = (double) DEFAULT_FCRYST * (double) (1L << 24); // 114.285 Mhz |
} |
else { // cal done before, read into fcryst |
DataEERead(&value, (F_CAL_DONE +1)); |
fcryst_freq.qw = value; |
}; |
#endif |
// Now that fcryst is checked, set it first so that it can be used by startup freq setting |
fcryst_double = (double) fcryst_freq.qw / (double) (1L << 24); |
validCombo = 1; |
command_count = 0; |
current_command_in = 0; |
current_command_out = 0; |
Old_freq_double = 0; |
// check for previous startup freq setting |
#if defined (UBW) |
if (Read_b_eep(F_INIT_FREQ) != F_INIT_FREQ_VALUE){ // not set before, use default |
avr_freq.qw = (double) DEFAULT_INIT_FREQ * (double) (1L << 21); |
} |
else { // startup freq set before, read into avr |
for (i=0; i<4; i++) avr_freq.bytes[i] = Read_b_eep(i + F_INIT_FREQ +1); |
}; |
#elif defined (UBW32) |
DataEERead(&value, F_INIT_FREQ); |
if ( value != F_INIT_FREQ_VALUE){ // not set before, use default |
avr_freq.qw = (double) DEFAULT_INIT_FREQ * (double) (1L << 21); |
} |
else { // set before, read |
DataEERead(&value, (F_INIT_FREQ +1)); |
avr_freq.qw = value; |
}; |
#endif |
// check for previous smooth setting |
#if defined (UBW) |
if (Read_b_eep(F_SMOOTH) != F_SMOOTH_VALUE){ // not set before, use default |
Smooth_double = (double) DEFAULT_SMOOTH / 1000000L; // in ppm |
} |
else { // set before, read |
for (i=0; i<2; i++) w.v[i] = Read_b_eep(i + F_SMOOTH +1); |
Smooth_double = (double) w.Val / 1000000L; |
}; |
#elif defined (UBW32) |
DataEERead(&value, F_SMOOTH); |
if ( value != F_SMOOTH_VALUE){ // not set before, use default |
Smooth_double = (double) DEFAULT_SMOOTH / 1000000L; |
} |
else { // set before, read |
DataEERead(&value, (F_SMOOTH +1)); |
w.Val = value; |
Smooth_double = (double) w.Val / 1000000L; |
} |
#endif |
// check for previous sub mul setting |
#if defined (UBW) |
if (Read_b_eep(F_SUB_MUL) != F_SUB_MUL_VALUE){ // not set before, use default |
f_sub.qw = (double) DEFAULT_SUB * (double) (1L << 21); |
f_mul.qw = (double) DEFAULT_MUL * (double) (1L << 21); |
} |
else { // startup freq set before, read into avr |
for (i=0; i<4; i++) f_sub.bytes[i] = Read_b_eep(i + F_SUB_MUL +1); |
for (i=0; i<4; i++) f_mul.bytes[i] = Read_b_eep(i + F_SUB_MUL +5); |
}; |
#elif defined (UBW32) |
DataEERead(&value, F_SUB_MUL); |
if ( value != F_SUB_MUL_VALUE){ // not set before, use default |
f_sub.qw = (double) DEFAULT_SUB * (double) (1L << 21); |
f_mul.qw = (double) DEFAULT_MUL * (double) (1L << 21); |
} |
else { // set before, read |
DataEERead(&value, (F_SUB_MUL +1)); |
f_sub.qw = value; |
DataEERead(&value, (F_SUB_MUL +2)); |
f_mul.qw = value; |
}; |
#endif |
// Check for Cross Over Points |
#if defined (UBW) |
if (Read_b_eep(F_CROSS_OVER) != F_CROSS_OVER_VALUE){ // not set before, use default |
#if defined (YAS) |
FilterSwitchOver[0] = (2.4 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; // default BPF switchover points |
FilterSwitchOver[1] = (8.5 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
FilterSwitchOver[2] = (19.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
FilterSwitchOver[3] = (19.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
FilterSwitchOver[4] = (19.0 - DEFAULT_SUB) * DEFAULT_MUL* 4.0; |
FilterSwitchOver[5] = (19.0 - DEFAULT_SUB) * DEFAULT_MUL* 4.0; |
FilterSwitchOver[6] = (19.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
#else |
FilterSwitchOver[0] = (2.4 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; // default BPF switchover points |
FilterSwitchOver[1] = (8.5 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
FilterSwitchOver[2] = (19.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
#endif |
for (i = 0; i < (NUM_BPF - 1); i++) FilterCrossOver[i] = Switch2Cross(FilterSwitchOver[i]); |
FilterCrossOver[(NUM_BPF-1)].Val = 1; // Enabled |
abpf_flag = 1; |
#if defined (K5OOR) |
LPFSwitchOver[0] = (2.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[1] = (4.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[2] = (7.45 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[3] = (15.0 - DEFAULT_SUB) * DEFAULT_MUL* 4.0; |
LPFSwitchOver[4] = (21.5 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[5] = (30.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[6] = (30.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
#elif defined (ALEX) |
LPFSwitchOver[0] = (2.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[1] = (4.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[2] = (9.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[3] = (11.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[4] = (14.5 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[5] = (20.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[6] = (30.0 - DEFAULT_SUB) * DEFAULT_MUL* 4.0; |
#elif defined (MARC) |
LPFSwitchOver[0] = (2.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[1] = (4.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[2] = (8.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[3] = (11.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[4] = (14.5 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[5] = (18.2 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[6] = (21.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
#else |
#error "Must define an LPF configuration." |
#endif |
for (i = 0; i < 7; i++) LPFCrossOver[i] = Switch2Cross(LPFSwitchOver[i]); |
LPFCrossOver[7].Val = 1; // Enabled |
} |
else { // set before, read |
for (i = 0; i < NUM_BPF; i++){ |
w.v[0] = Read_b_eep(2 * i + F_CROSS_OVER +1); |
w.v[1] = Read_b_eep(2 * i + 1 + F_CROSS_OVER + 1); |
FilterCrossOver[i].Val = w.Val; |
}; |
abpf_flag = FilterCrossOver[(NUM_BPF-1)].v[0]; |
for (i = 0; i < 8; i++){ |
w.v[0] = Read_b_eep(2 * i + F_CROSS_OVER +17); |
w.v[1] = Read_b_eep(2 * i + 1 + F_CROSS_OVER + 17); |
LPFCrossOver[i].Val = w.Val; |
}; |
} |
#elif defined (UBW32) |
DataEERead(&value, F_CROSS_OVER); |
if ( value != F_CROSS_OVER_VALUE){ // not set before, use default |
FilterSwitchOver[0] = (2.4 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; // default BPF switchover points |
FilterSwitchOver[1] = (8.5 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
FilterSwitchOver[2] = (19.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
for (i = 0; i < 3; i++) FilterCrossOver[i] = Switch2Cross(FilterSwitchOver[i]); |
FilterCrossOver[3].Val = 1; // Enabled |
abpf_flag = 1; |
#if defined (K5OOR) |
LPFSwitchOver[0] = (2.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[1] = (4.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[2] = (7.45 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[3] = (15.0 - DEFAULT_SUB) * DEFAULT_MUL* 4.0; |
LPFSwitchOver[4] = (21.5 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[5] = (30.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[6] = (30.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
#elif defined (ALEX) |
LPFSwitchOver[0] = (2.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[1] = (4.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[2] = (9.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[3] = (11.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[4] = (14.5 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[5] = (20.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[6] = (30.0 - DEFAULT_SUB) * DEFAULT_MUL* 4.0; |
#elif defined (MARC) |
LPFSwitchOver[0] = (2.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[1] = (4.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[2] = (8.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[3] = (11.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[4] = (14.5 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[5] = (18.2 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
LPFSwitchOver[6] = (21.0 - DEFAULT_SUB) * DEFAULT_MUL * 4.0; |
#else |
#error "Must define an LPF configuration." |
#endif |
for (i = 0; i < 7; i++) LPFCrossOver[i] = Switch2Cross(LPFSwitchOver[i]); |
LPFCrossOver[7].Val = 1; // Enabled |
} |
else { // set before, read |
for (i=0; i< NUM_BPF; i++) { |
DataEERead(&value, (i + F_CROSS_OVER +1)); |
FilterCrossOver[i].Val = value; |
}; |
abpf_flag = FilterCrossOver[(NUM_BPF-1)].Val; |
for (i=0; i<8; i++) { |
DataEERead(&value, (i + F_CROSS_OVER +9)); |
LPFCrossOver[i].Val = value; |
}; |
}; |
#endif // UBW32 |
for (i = 0; i < (NUM_BPF-1); i++) FilterSwitchOver[i] = Cross2Switch(FilterCrossOver[i]); |
for (i = 0; i < 7; i++) LPFSwitchOver[i] = Cross2Switch(LPFCrossOver[i]); |
// End initialising filter switchover points |
#if defined(UBW) |
blinkStatusValid = Read_b_eep(F_BLINK_LED); |
#elif defined (UBW32) |
DataEERead(&value, F_BLINK_LED); |
blinkStatusValid = value; |
#endif |
#if defined (UBW) |
OpenI2C(MASTER, SLEW_ON);// Initialize I2C module |
SSPADD = 48; //400kHz Baud clock(9) @16MHz |
//100kHz Baud clock(39) @16MHz |
#elif defined (UBW32) |
OpenI2C1(I2C_ON, ( GetPeripheralClock() / 400000UL - 2) ); |
#endif |
// IF we don't reset Si570 on startup, it will not hang if Si570 not connected |
#if defined (INIT_SI570_ON_STARTUP) |
Reset_Si570(); |
#endif |
// check for previous startup freq setting, if set, then set Si570 to startup freq |
#if defined (UBW32) |
DataEERead(&value, F_INIT_FREQ); |
if ( value == F_INIT_FREQ_VALUE){ |
#else |
if (Read_b_eep(F_INIT_FREQ) == F_INIT_FREQ_VALUE){ |
#endif |
// avr_freq has been setup by the reading of the startup freq |
set_frequency = (double) avr_freq.qw / (double)(1L << 21); |
SetFrequency(set_frequency); |
}; |
}//end UserInit |
/****************************************************************************** |
* Function: void ProcessIO(void) |
* |
* PreCondition: None |
* |
* Input: None |
* |
* Output: None |
* |
* Side Effects: None |
* |
* Overview: This function is a place holder for other user routines. |
* It is a mixture of both USB and non-USB tasks. |
* |
* Note: None |
*****************************************************************************/ |
void ProcessIO(void) |
{ |
if (SwitchIsPressed()){ |
blinkStatusValid = !blinkStatusValid; // toggle blink led |
#if defined(UBW) |
Write_b_eep(F_BLINK_LED, blinkStatusValid); |
#elif defined(UBW32) |
DataEEWrite(blinkStatusValid, F_BLINK_LED); |
#endif |
}; |
//Blink the LEDs according to the USB device status |
if(blinkStatusValid) BlinkUSBStatus(); |
else mLED_Both_Off(); |
// User Application USB tasks |
if((USBDeviceState < ADDRESS_STATE)||(USBSuspendControl==1)) return; |
//respond to any USB commands that might have come over the bus |
ServiceRequests(); |
}//end ProcessIO |
/****************************************************************************** |
* Function: void ServiceRequests(void) |
* |
* PreCondition: None |
* |
* Input: None |
* |
* Output: None |
* |
* Side Effects: USB traffic can be generated |
* |
* Overview: This function takes in the commands from the PC from the |
* application and executes the commands requested |
* |
* Note: None |
*****************************************************************************/ |
void ServiceRequests(void) |
{ |
BYTE command_to_process; |
if (command_count > 0) { // there is command in buffer |
command_to_process = command_buffer[current_command_out].command; |
switch (command_to_process){ |
case CMD_SET_FREQ_REG: |
Set_Register_Handler(); |
break; |
case CMD_SET_LO_SM: |
Set_Sub_Mul_Handler(); |
break; |
case CMD_SET_FREQ: |
Set_Freq_Handler(); |
break; |
case CMD_SET_XTAL: |
Set_Cal_Handler(); |
break; |
case CMD_SET_STARTUP: |
Set_Init_Freq_Handler(); |
break; |
case CMD_SET_PPM: |
Set_Smooth_Handler(); |
break; |
}; |
// end switch |
current_command_out++; |
if (current_command_out >= COMMAND_BUFFER_SIZE) current_command_out = 0; |
command_count--; |
} // end command_count > 0 |
}//end ServiceRequests |
/******************************************************************** |
* Function: void BlinkUSBStatus(void) |
* |
* PreCondition: None |
* |
* Input: None |
* |
* Output: None |
* |
* Side Effects: None |
* |
* Overview: BlinkUSBStatus turns on and off LEDs |
* corresponding to the USB device state. |
* |
* Note: mLED macros can be found in HardwareProfile.h |
* USBDeviceState is declared and updated in |
* usb_device.c. |
*******************************************************************/ |
void BlinkUSBStatus(void) |
{ |
static WORD led_count=0; |
if(led_count == 0)led_count = 10000U; |
led_count--; |
if(USBSuspendControl == 1) |
{ |
if(led_count==0) |
{ |
mLED_1_Toggle(); |
mLED_2 = mLED_1; |
}//end if |
} |
else |
{ |
if(USBDeviceState == DETACHED_STATE) |
{ |
mLED_1_Off(); mLED_2_Off(); |
} |
else if(USBDeviceState == ATTACHED_STATE) |
{ |
mLED_1_On(); mLED_2_On(); |
} |
else if(USBDeviceState == POWERED_STATE) |
{ |
mLED_1_On(); mLED_2_Off(); |
} |
else if(USBDeviceState == DEFAULT_STATE) |
{ |
mLED_1_Off(); mLED_2_On(); |
} |
else if(USBDeviceState == ADDRESS_STATE) |
{ |
if(led_count == 0) |
{ |
mLED_1_Toggle(); |
mLED_2_Off(); |
}//end if |
} |
else if(USBDeviceState == CONFIGURED_STATE) |
{ |
if(led_count==0) |
{ |
mLED_1_Toggle(); |
mLED_2 = !mLED_1; |
}//end if |
}//end if(...) |
}//end if(UCONbits.SUSPND...) |
}//end BlinkUSBStatus |
/****************************************************************************** |
* Function: BOOL SwitchIsPressed(void) |
* |
* PreCondition: None |
* |
* Input: None |
* |
* Output: BOOL - TRUE if the SW2 was pressed and FALSE otherwise |
* |
* Side Effects: None |
* |
* Overview: returns TRUE if the SW2 was pressed and FALSE otherwise |
* |
* Note: None |
*****************************************************************************/ |
BOOL SwitchIsPressed(void) |
{ |
if(UserSW != old_SW) |
{ |
old_SW = UserSW; // Save new value |
if(UserSW == 0) // If pressed |
return TRUE; // Was pressed |
}//end if |
return FALSE; // Was not pressed |
}//end SwitchIsPressed |
void Reset_Si570() |
{ |
#if defined (UBW) |
StartI2C(); //Reset Si570 to Startup |
IdleI2C(); |
WriteI2C(i2c_adr << 1); |
WriteI2C(135); //REG 135 |
WriteI2C(0x01); // reset |
StopI2C(); |
IdleI2C(); |
#elif defined (UBW32) |
StartI2C1(); //Reset Si570 to Startup |
IdleI2C1(); |
MasterWriteI2C1(i2c_adr << 1); |
MasterWriteI2C1(135); //REG 135 |
MasterWriteI2C1(0x01); // reset |
StopI2C1(); |
IdleI2C1(); |
#endif |
} |
void ReadRegs() |
{ |
unsigned int i; |
for(i=0;i<6;i++) |
{ |
#if defined (UBW) |
StartI2C(); |
IdleI2C(); |
WriteI2C(i2c_adr << 1); |
WriteI2C(i+7); //specify register |
RestartI2C(); |
IdleI2C(); |
WriteI2C(i2c_adr << 1 | 0x01); |
registers[i] = ReadI2C(); |
StopI2C(); |
IdleI2C(); |
#elif defined (UBW32) |
StartI2C1(); |
IdleI2C1(); |
MasterWriteI2C1(i2c_adr << 1); |
MasterWriteI2C1(i+7); |
RestartI2C1(); |
IdleI2C1(); |
MasterWriteI2C1(i2c_adr << 1 | 0x01); |
registers[i] = MasterReadI2C1(); |
StopI2C1(); |
IdleI2C1(); |
#endif |
} |
} |
void Freeze () { |
Prep_rd(137); //get current value |
#if defined (UBW) |
R137 = ReadI2C(); |
#elif defined (UBW32) |
R137 = MasterReadI2C1(); |
#endif |
R137 = R137 | 0x10; //turn on freeze |
WriteBk(); |
} |
void Unfreeze () { |
Prep_rd(137); |
#if defined (UBW) |
R137 = ReadI2C(); |
#elif defined (UBW32) |
R137 = MasterReadI2C1(); |
#endif |
R137 = R137 & 0xEF; |
WriteBk(); |
} |
void WriteBk () { //Write back |
#if defined (UBW) |
StopI2C(); |
IdleI2C(); |
StartI2C(); |
IdleI2C(); |
WriteI2C(i2c_adr<<1); |
WriteI2C(137); //REG |
WriteI2C(R137); // new data |
StopI2C(); |
IdleI2C(); |
#elif defined (UBW32) |
StopI2C1(); |
IdleI2C1(); |
StartI2C1(); |
IdleI2C1(); |
MasterWriteI2C1(i2c_adr<<1); |
MasterWriteI2C1(137); //REG |
MasterWriteI2C1(R137); // new data |
StopI2C1(); |
IdleI2C1(); |
#endif |
} |
void Prep_rd (unsigned short r) { // get ready to read |
#if defined (UBW) |
StartI2C(); |
IdleI2C(); |
WriteI2C(i2c_adr<<1); |
WriteI2C(r); //REG |
RestartI2C(); |
IdleI2C(); |
WriteI2C(i2c_adr<<1 | 0x01); |
#elif defined (UBW32) |
StartI2C1(); |
IdleI2C1(); |
MasterWriteI2C1(i2c_adr<<1); |
MasterWriteI2C1(r); //REG |
RestartI2C1(); |
IdleI2C1(); |
MasterWriteI2C1(i2c_adr<<1 | 0x01); |
#endif |
} |
void NewF () { |
Prep_rd(135); |
#if defined (UBW) |
R135 = ReadI2C(); |
R135 |= 0x40; // set New Data bit |
StopI2C(); |
IdleI2C(); |
StartI2C(); |
IdleI2C(); |
WriteI2C(i2c_adr<<1); |
WriteI2C(135); //REG |
WriteI2C(R135); |
StopI2C(); |
IdleI2C(); |
#elif defined (UBW32) |
R135 = MasterReadI2C1(); |
R135 |= 0x40; // set New Data bit |
StopI2C1(); |
IdleI2C1(); |
StartI2C1(); |
IdleI2C1(); |
MasterWriteI2C1(i2c_adr<<1); |
MasterWriteI2C1(135); //REG |
MasterWriteI2C1(R135); |
StopI2C1(); |
IdleI2C1(); |
#endif |
} |
void RunFreqProg(double f) |
{ |
double rfreq_fraction; |
unsigned long rfreq_integer_part; |
unsigned long rfreq_fraction_part; |
const float FDCO_MAX = 5670; //MHz |
const float FDCO_MIN = 4850; |
// Register finding the lowest DCO frequenty - code from Fred |
unsigned char xHS_DIV; |
unsigned int xN1; |
unsigned int xN; |
// Registers to save the found dividers |
unsigned char sHS_DIV=0; |
unsigned char sN1=0; |
unsigned int sN=0; // Total dividing |
unsigned int N0; // Total divider needed (N1 * HS_DIV) |
// Find the total division needed. |
// It is always one too low (not in the case reminder is zero, reminder not used here). |
N0 = FDCO_MIN / (float) f; |
sN = 11*128; |
for(xHS_DIV = 11; xHS_DIV > 3; xHS_DIV--) |
{ |
// Skip the unavailable divider's |
if (xHS_DIV == 8 || xHS_DIV == 10) |
continue; |
// Calculate the needed low speed divider |
xN1 = N0 / xHS_DIV + 1; |
if (xN1 > 128) |
continue; |
// Skip the unavailable divider's |
if (xN1 != 1 && (xN1 & 1) == 1) |
xN1 += 1; |
xN = xHS_DIV * xN1; |
if (sN > xN) |
{ |
sN = xN; |
sN1 = xN1; |
sHS_DIV = xHS_DIV; |
} |
}; |
validCombo = 0; |
if (sHS_DIV == 0) return; // no valid dividers found |
rfreq = f * (double) sN; // DCO freq |
if ((float)rfreq > FDCO_MAX) return; // calculated DCO freq > max |
validCombo = 1; |
// rfreq is a 38 bit number, MSB 10 bits integer portion, and LSB 28 fraction |
// in the Si570 registers, tempBuf[1] has 6 bits, and tempBuf[2] has 4 bits of the integer portion |
rfreq /= fcryst_double; // DCO divided by fcryst |
rfreq_integer_part = rfreq; |
rfreq_fraction = rfreq - rfreq_integer_part; |
rfreq_fraction_part = rfreq_fraction * (1L << 28); |
sHS_DIV -= 4; |
sN1 -= 1; |
tempBuf[0] = (sHS_DIV << 5) | (sN1 >> 2); |
tempBuf[1] = (sN1 & 3) << 6; |
tempBuf[1] |= ((rfreq_integer_part >> 4) & 0x3f); |
tempBuf[2] = ((rfreq_integer_part & 0x0f) << 4) | (rfreq_fraction_part >> 24); |
tempBuf[3] = rfreq_fraction_part >> 16; |
tempBuf[4] = rfreq_fraction_part >> 8; |
tempBuf[5] = rfreq_fraction_part; |
} |
void SetNewFreq() |
{ int i; |
double freq_double; |
double delta_freq; |
if(validCombo) |
{ |
Freeze(); // freeze DCO |
for (i=7; i<=12; i++){ //Data to Si570 |
#if defined (UBW) |
StartI2C(); |
IdleI2C(); |
WriteI2C(i2c_adr<<1); |
WriteI2C(i); //specify register |
WriteI2C(tempBuf[i-7]); // new data to registers |
StopI2C(); |
IdleI2C(); |
#elif defined (UBW32) |
StartI2C1(); |
IdleI2C1(); |
MasterWriteI2C1(i2c_adr<<1); |
MasterWriteI2C1(i); //specify register |
MasterWriteI2C1(tempBuf[i-7]); // new data to registers |
StopI2C1(); |
IdleI2C1(); |
#endif |
} |
Unfreeze (); // thaw (unfreeze) |
// check for smooth tune range |
freq_double = Freq_From_Register(fcryst_double); |
if (freq_double >= Old_freq_double) delta_freq = freq_double - Old_freq_double; |
else delta_freq = Old_freq_double - freq_double; |
if (((delta_rfreq / Old_rfreq ) > Smooth_double) || (delta_freq > 0.5)){ |
NewF (); // indicate new freq. This will cause a pause in the Si570 output |
Old_rfreq = rfreq; |
Old_freq_double = freq_double; |
}; |
// set filters, using set freq without offset and multiplier |
if (abpf_flag) Set_BPF((float) set_frequency); |
Set_LPF((float)set_frequency); |
}; // valid combo |
} |
double Freq_From_Register(double fcryst){ // side effects: rfreq and delta_rfreq are set |
double freq_double; |
unsigned char n1; |
unsigned char hsdiv; |
unsigned long rfreq_integer_portion, rfreq_fraction_portion; |
// Now find out the current rfreq and freq |
hsdiv = ((tempBuf[0] & 0xE0) >> 5) + 4; |
n1 = ((tempBuf[0] & 0x1f ) << 2 ) + ((tempBuf[1] & 0xc0 ) >> 6 ); |
// if(n1 == 0) n1 = 1; |
// else if((n1 & 1) !=0) n1 += 1; |
n1 += 1; |
rfreq_integer_portion = ((unsigned long)(tempBuf[1] & 0x3f)) << 4 | |
((unsigned long)(tempBuf[2] & 0xf0)) >> 4; |
rfreq_fraction_portion = ((unsigned long) (tempBuf[2] & 0x0f)) << 24; |
rfreq_fraction_portion += ((unsigned long)(tempBuf[3])) << 16; |
rfreq_fraction_portion += ((unsigned long)(tempBuf[4])) << 8; |
rfreq_fraction_portion += ((unsigned long)(tempBuf[5])); |
rfreq = (double)rfreq_integer_portion + ((double)rfreq_fraction_portion / (1L << 28)); |
if (rfreq >= Old_rfreq) delta_rfreq = rfreq - Old_rfreq; |
else delta_rfreq = Old_rfreq - rfreq; |
freq_double = fcryst * rfreq / (double) hsdiv / (double) n1; |
return (freq_double); |
} |
void Set_BPF(float freq){ // note the freq used is the Si570 freq |
#if defined(YAS) |
if (freq < FilterSwitchOver[0]) {BPF_S2 = 0;BPF_S1 = 0; BPF_S0 = 0;} |
else if (freq < FilterSwitchOver[1]) {BPF_S2 = 0; BPF_S1=0;BPF_S0=1;} |
else if (freq < FilterSwitchOver[2]) {BPF_S2 = 0;BPF_S1=1;BPF_S0=0;} |
else if (freq < FilterSwitchOver[3]) {BPF_S2 = 0; BPF_S1 = 1; BPF_S0 = 1;} |
else if (freq < FilterSwitchOver[4]) {BPF_S2 = 1; BPF_S1 = 0; BPF_S0 = 0;} |
else if (freq < FilterSwitchOver[5]) {BPF_S2 = 1; BPF_S1 = 0; BPF_S0 = 1;} |
else if (freq < FilterSwitchOver[6]) {BPF_S2 = 1; BPF_S1 = 1; BPF_S0 = 0;} |
else {BPF_S2 = 1;BPF_S1=1; BPF_S0=1;}; |
#else |
if (freq < FilterSwitchOver[0]) {BPF_S1 = 0; BPF_S0 = 0;} |
else if (freq < FilterSwitchOver[1]) {BPF_S1=0;BPF_S0=1;} |
else if (freq < FilterSwitchOver[2]) {BPF_S1=1;BPF_S0=0;} |
else {BPF_S1=1; BPF_S0=1;}; |
#endif |
} |
void Set_LPF(float freq){ |
unsigned char LPF_select; |
LPF_0 = 0; |
LPF_1 = 0; |
LPF_2 = 0; |
#if defined(YAS) |
if (freq < LPFSwitchOver[0]) {LPF_0 = 0; LPF_1 = 0; LPF_2 = 0; LPF_select = 0x01;} |
else if (freq < LPFSwitchOver[1]) {LPF_0 = 1; LPF_1 = 0; LPF_2 = 0; LPF_select = 0x02;} |
else if (freq < LPFSwitchOver[2]) {LPF_0 = 0; LPF_1 = 1; LPF_2 = 0; LPF_select = 0x04;} |
else if (freq < LPFSwitchOver[3]) {LPF_0 = 1; LPF_1 = 1; LPF_2 = 0; LPF_select = 0x08;} |
else if (freq < LPFSwitchOver[4]) {LPF_0 = 0; LPF_1 = 0; LPF_2 = 1; LPF_select = 0x10;} |
else if (freq < LPFSwitchOver[5]) {LPF_0 = 1; LPF_1 = 0; LPF_2 =1; LPF_select = 0x20;} |
else if (freq < LPFSwitchOver[6]) {LPF_0 = 0; LPF_1 = 1; LPF_2 = 1; LPF_select = 0x40;} |
else {LPF_0 = 1; LPF_1 = 1; LPF_2 = 1; LPF_select = 0x80;}; |
#else |
LPF_3 = 0; |
LPF_4 = 0; |
LPF_5 = 0; |
LPF_6 = 0; |
if (freq < LPFSwitchOver[0]) {LPF_0 = 1; LPF_select = 0x01;} |
else if (freq < LPFSwitchOver[1]) {LPF_1 = 1; LPF_select = 0x02;} |
else if (freq <= LPFSwitchOver[2]) {LPF_2 = 1; LPF_select = 0x04;} |
else if (freq < LPFSwitchOver[3]) {LPF_3 = 1; LPF_select = 0x08;} |
else if (freq < LPFSwitchOver[4]) {LPF_4 = 1; LPF_select = 0x10;} |
else if (freq < LPFSwitchOver[5]) {LPF_5 = 1; LPF_select = 0x20;} |
else if (freq < LPFSwitchOver[6]) {LPF_6 = 1; LPF_select = 0x40;} |
else {LPF_6 = 1; LPF_select = 0x80;}; |
#endif |
// Now use i2c bus to switch LPF |
#if defined (UBW) |
StartI2C(); |
IdleI2C(); |
WriteI2C(PCF8574 << 1); |
WriteI2C(LPF_select); |
StopI2C(); |
IdleI2C(); |
#elif defined (UBW32) |
StartI2C1(); |
IdleI2C1(); |
MasterWriteI2C1(PCF8574 << 1); |
MasterWriteI2C1(LPF_select); |
StopI2C1(); |
IdleI2C1(); |
#endif |
} |
void SetFrequency(double f) |
{ |
// introduce the offset and mul here |
RunFreqProg((f - ((double)f_sub.qw / (double)(1L << 21))) * (double)f_mul.qw/(double)(1L <<21)); |
SetNewFreq(); |
} |
void Set_Freq_Handler(void){ // 4 byte freq value in avr_freq format |
BYTE i; |
if (command_buffer[current_command_out].wCount == 4){ |
for (i=0; i<4; i++) avr_freq.bytes[i] = command_buffer[current_command_out].data[i]; |
set_frequency = (double) avr_freq.qw / (double)(1L << 21); |
SetFrequency(set_frequency); |
} |
} |
void Set_Register_Handler(void){ // 6 byte register value |
unsigned char i; |
if (command_buffer[current_command_out].wCount == 6){ |
for (i=0; i<6; i++) tempBuf[i] = command_buffer[current_command_out].data[i]; |
set_frequency = Freq_From_Register(DEFAULT_FCRYST); |
SetFrequency(set_frequency); |
} |
} |
void Set_Cal_Handler(void){ |
// 4 bytes of fcryst freq in avr_freq format |
int i; |
if (command_buffer[current_command_out].wCount == 4){ |
for (i=0; i<4; i++)fcryst_freq.bytes[i] = command_buffer[current_command_out].data[i]; |
fcryst_double = (double) fcryst_freq.qw / (double)(1L << 24); |
#if defined(UBW) |
for (i=0; i<4; i++){ |
Write_b_eep (i+F_CAL_DONE+1, fcryst_freq.bytes[i]); |
Busy_eep (); |
}; |
#elif defined (UBW32) |
DataEEWrite( (unsigned int) fcryst_freq.qw, (F_CAL_DONE + 1)); |
#endif |
#if defined (UBW) |
Write_b_eep(F_CAL_DONE, F_CAL_DONE_VALUE); |
Busy_eep(); |
#elif defined (UBW32) |
DataEEWrite(F_CAL_DONE_VALUE, F_CAL_DONE); |
#endif |
}; |
} |
void Set_Init_Freq_Handler(void) |
{ |
#if defined (UBW) |
unsigned char i; |
#else |
unsigned int i; |
#endif |
if (command_buffer[current_command_out].wCount == 4){ |
for (i=0; i<4; i++) avr_freq.bytes[i] = command_buffer[current_command_out].data[i]; |
#if defined (UBW) |
for (i=0; i<4; i++){ |
Write_b_eep((i + F_INIT_FREQ +1), avr_freq.bytes[i]); |
Busy_eep(); |
}; |
#elif defined (UBW32) |
DataEEWrite( (unsigned int) avr_freq.qw, (F_INIT_FREQ +1)); |
#endif |
#if defined (UBW) |
Write_b_eep(F_INIT_FREQ, F_INIT_FREQ_VALUE); |
Busy_eep(); |
#elif defined (UBW32) |
DataEEWrite(F_INIT_FREQ_VALUE, F_INIT_FREQ); |
#endif |
}; |
} |
void Set_Sub_Mul_Handler(void) |
{ |
#if defined (UBW) |
unsigned char i; |
#else |
unsigned int i; |
#endif |
avr_freq_t old_f_mul; |
offset_t old_f_sub; |
double filter_value; |
if (command_buffer[current_command_out].wCount == 8){ |
old_f_sub = f_sub; // save old values first |
old_f_mul = f_mul; |
for (i=0; i<4; i++) f_sub.bytes[i] = command_buffer[current_command_out].data[i]; |
for (i=0; i<4; i++) f_mul.bytes[i] = command_buffer[current_command_out].data[i+4]; |
#if defined (UBW) |
for (i=0; i<4; i++){ |
Write_b_eep((i + F_SUB_MUL +1), f_sub.bytes[i]); |
Busy_eep(); |
}; |
for (i=0; i<4; i++){ |
Write_b_eep((i + F_SUB_MUL +5), f_mul.bytes[i]); |
Busy_eep(); |
}; |
#elif defined (UBW32) |
DataEEWrite( (unsigned int) f_sub.qw, (F_SUB_MUL +1)); |
DataEEWrite( (unsigned int) f_mul.qw, (F_SUB_MUL +5)); |
#endif |
#if defined (UBW) |
Write_b_eep(F_SUB_MUL, F_SUB_MUL_VALUE); |
Busy_eep(); |
#elif defined (UBW32) |
DataEEWrite(F_SUB_MUL_VALUE, F_SUB_MUL); |
#endif |
// Now update the filter switchover points as well |
for (i = 0; i < (NUM_BPF - 1); i++){ |
// get back filter_value in Mhz |
filter_value = FilterSwitchOver[i] / (old_f_mul.qw / ((double) (1L << 21))) / 4 + (old_f_sub.qw / ((double) (1L << 21))); |
// now convert to new translated values |
FilterSwitchOver[i] = (filter_value - (f_sub.qw / (double)(1L << 21))) * (f_mul.qw / (double)(1L << 21)) * 4; |
FilterCrossOver[i] = Switch2Cross(FilterSwitchOver[i]); |
}; |
for (i = 0; i < 7; i++){ |
// get back filter_value in Mhz |
filter_value = LPFSwitchOver[i] / (old_f_mul.qw / ((double) (1L << 21))) / 4 + (old_f_sub.qw / ((double) (1L << 21))); |
// now convert to new translated values |
LPFSwitchOver[i] = (filter_value - (f_sub.qw / (double)(1L << 21))) * (f_mul.qw / (double)(1L << 21)) * 4; |
LPFCrossOver[i] = Switch2Cross(LPFSwitchOver[i]); |
}; |
}; // if wCount == 8 |
} |
void Set_Smooth_Handler(void) |
{ |
WORD_VAL w; |
unsigned int i; |
if (command_buffer[current_command_out].wCount == 2){ // 2 bytes of Smooth Tune value in ppm |
w.v[0] = command_buffer[current_command_out].data[0]; |
w.v[1] = command_buffer[current_command_out].data[1]; |
Smooth_double = (double) w.Val / 1000000L; |
#if defined (UBW) |
for (i=0; i<2; i++){ |
Write_b_eep (i+F_SMOOTH+1, w.v[i]); |
Busy_eep (); |
}; |
#elif defined (UBW32) |
DataEEWrite( (unsigned int) w.Val, (i + F_SMOOTH + 1)); |
#endif |
#if defined (UBW) |
Write_b_eep(F_SMOOTH, F_SMOOTH_VALUE); |
Busy_eep(); |
#elif defined (UBW32) |
DataEEWrite( F_SMOOTH_VALUE, F_SMOOTH); |
#endif |
} |
} |
/** EOF user.c ***************************************************************/ |
/Modules/Clock/CLKGEN01A/SW/DG8SAQ synthesiser_Emulator/user.h |
---|
0,0 → 1,197 |
/********************************************************************* |
* |
* Microchip USB C18 Firmware Version 1.2 |
* |
********************************************************************* |
* FileName: user.h |
* Dependencies: See INCLUDES section below |
* Processor: PIC18 |
* Compiler: C18 3.11+ |
* Company: Microchip Technology, Inc. |
* |
* Software License Agreement |
* |
* The software supplied herewith by Microchip Technology Incorporated |
* (the Company) for its PICmicro® Microcontroller is intended and |
* supplied to you, the Companys customer, for use solely and |
* exclusively on Microchip PICmicro Microcontroller products. The |
* software is owned by the Company and/or its supplier, and is |
* protected under applicable copyright laws. All rights are reserved. |
* Any use in violation of the foregoing restrictions may subject the |
* user to criminal sanctions under applicable laws, as well as to |
* civil liability for the breach of the terms and conditions of this |
* license. |
* |
* THIS SOFTWARE IS PROVIDED IN AN AS IS CONDITION. NO WARRANTIES, |
* WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED |
* TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
* PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, |
* IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR |
* CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
* |
* Author Date Comment |
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
* Rawin Rojvanit 11/19/04 Original. |
* Rawin Rojvanit 05/14/07 Minor updates. |
********************************************************************/ |
#ifndef PICDEM_FS_DEMO_H |
#define PICDEM_FS_DEMO_H |
/** I N C L U D E S **********************************************************/ |
/** D E F I N I T I O N S ****************************************************/ |
// For custom LPF switchover points |
#define ALEX |
//#define K5OOR |
//#define MARC |
// YAS is defined in the HardwareProfile - UBW.h, if needed |
#if defined(YAS) |
#define NUM_BPF 8 |
#else |
#define NUM_BPF 4 |
#endif |
#define INIT_SI570_ON_STARTUP |
#define VERSION_MAJOR 16 |
#define VERSION_MINOR 04 |
#define DEFAULT_I2C_ADDRESS 0x55 |
#define PCF8574 0x39 // A2 A1 A0 -> 0 0 1 |
#define F_CAL_DONE 0 // EEPROM position of F_CAL_DONE flag. 4 bytes follow. |
#define F_CAL_DONE_VALUE 0x55 |
#define DEFAULT_FCRYST 114.285 |
//#if defined(UBW) |
#define F_INIT_FREQ 5 // 4 bytes follow |
//#elif defined(UBW32) |
//#define F_INIT_FREQ 2 // fcryst 4 bytes all stored in one 32 bit slot |
//#endif |
#define F_INIT_FREQ_VALUE 0x55 |
#define DEFAULT_INIT_FREQ 56.32 |
#if defined(UBW) |
#define F_SMOOTH 10 // 2 bytes follow |
#elif defined(UBW32) |
#define F_SMOOTH 4 // 1 slot follow |
#endif |
#define F_SMOOTH_VALUE 0x55 |
#define DEFAULT_SMOOTH 3500 // ppm |
#define F_SUB_MUL_VALUE 0x55 |
#define DEFAULT_SUB 0.0 |
#define DEFAULT_MUL 1.0 |
#if defined(UBW) |
#define F_SUB_MUL 13 // 8 bytes follow |
#elif defined(UBW32) |
#define F_SUB_MUL 6 // 2 slots follow |
#endif |
#if defined(UBW) |
#define F_CROSS_OVER 22 // 32 bytes follow |
#elif defined(UBW32) |
#define F_CROSS_OVER 9 // 16 words stored in 16 (unsigned int) slots |
#endif |
#define F_CROSS_OVER_VALUE 0x55 |
#if defined(UBW) |
#define F_BLINK_LED 55 |
#elif defined(UBW32) |
#define F_BLINK_LED 26 |
#endif |
/** S T R U C T U R E S ******************************************************/ |
extern BYTE i2c_adr; |
extern BYTE command; |
extern BYTE replybuf[8]; |
extern WORD wCount; |
#define COMMAND_BUFFER_SIZE 16 |
#define DATA_PACKET_SIZE 6 |
typedef struct COMMAND_BUFFER |
{ |
BYTE command; |
WORD wCount; |
BYTE data[DATA_PACKET_SIZE]; |
} COMMAND_BUFFER_t; |
extern COMMAND_BUFFER_t command_buffer[COMMAND_BUFFER_SIZE]; |
extern BYTE current_command_in, current_command_out; |
extern BYTE command_count; |
extern double set_frequency; |
extern unsigned char tempBuf[8]; |
typedef union _avr_freq |
{ |
unsigned long qw; |
unsigned char bytes[4]; |
} avr_freq_t; |
extern avr_freq_t avr_freq, fcryst_freq; //frequency [MHz]*2^21 |
// fcryst freq [MHz]*2^24 |
extern avr_freq_t f_mul; // mul for set freq in 11.21 format |
typedef union _offset |
{ |
long qw; // signed offset in 11.21 format |
unsigned char bytes[4]; |
} offset_t; |
extern offset_t f_sub; |
extern unsigned char registers[6]; |
extern BYTE abpf_flag; |
extern double Smooth_double; |
extern double fcryst_double; |
extern WORD_VAL FilterCrossOver[8]; // 11.5 bit value Mhz |
extern float FilterSwitchOver[7]; |
extern WORD_VAL LPFCrossOver[8]; |
extern float LPFSwitchOver[7]; |
/** P U B L I C P R O T O T Y P E S *****************************************/ |
void UserInit(void); |
void ProcessIO(void); |
void Set_Freq_Handler(void); |
void Set_Register_Handler(void); |
void Set_Cal_Handler(void); |
void Set_Init_Freq_Handler(void); |
void Set_Smooth_Handler(void); |
void Set_Sub_Mul_Handler(void); |
void Reset_Si570(void); |
void Freeze (void); |
void Unfreeze (void); |
void Prep_rd (unsigned short); |
void WriteBk (void); |
void NewF (void); |
void SetNewFreq(void); |
void ReadRegs(void); |
void ReadStartUpConfiguration(void); |
void RunFreqProg(double); |
void SetFrequency(double); |
void Set_BPF(float); |
void Set_LPF(float); |
float Cross2Switch(WORD_VAL); |
WORD_VAL Switch2Cross(float); |
double Freq_From_Register(double); |
void Read_Command_Into_Buffer(void); |
void USBCheckUserRequest(void); |
void USBCheckUBWRequest(void); |
#endif //PICDEM_FS_DEMO_H |
/Modules/Clock/CLKGEN01A/opravit.txt |
---|
0,0 → 1,9 |
moc blizko soucastky. |
Pouzdro diody musi byt SMA. |
Neni oznacena jednicka u U1. |
Vylepsit blokovani U1. Pridat prokovy. |
Zrusit paralelni vstup. |
/Modules/Clock/CLKGEN01A/PCB/CLKGEN.pcb |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/Modules/Clock/CLKGEN01A/PrjInfo.txt |
---|
0,0 → 1,14 |
[InfoShortDescription.en] |
Low jitter clock generator |
[InfoShortDescription.cs] |
Generátor hodin s nízkým šumem. |
[InfoLongDescription.en] |
Single output I2C programmable clock generator. |
[InfoLongDescription.cs] |
I2C programovatelný precizní generátor hodin s výstupem na SATA konektor. |
[End] |
based on http://wb6dhw.com/Si570/Si570.html |
/Modules/Clock/CLKGEN01A/CLKGEN01A_Bottom_Small.jpg |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/Modules/Clock/CLKGEN01A/DOC/SRC/CLKGEN01A_Bottom_Big.jpg |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/Modules/Clock/CLKGEN01A/DOC/CLKGEN01A.pdf |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/Modules/Clock/CLKGEN01A/CAM_AMA/T1.pdf |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/Modules/Clock/CLKGEN01A/CAM_AMA/V2.pdf |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/Modules/Clock/CLKGEN01A/CAM_PROFI/M2.PHO |
---|
0,0 → 1,255 |
* |
* |
G04 PADS9.0.2 Build Number: 372616 generated Gerber (RS-274-X) file* |
G04 PC Version=2.1* |
* |
%IN "CLKGEN.pcb"*% |
* |
%MOIN*% |
* |
%FSLAX35Y35*% |
* |
* |
* |
* |
G04 PC Standard Apertures* |
* |
* |
G04 Thermal Relief Aperture macro.* |
%AMTER* |
1,1,$1,0,0* |
1,0,$1-$2,0,0* |
21,0,$3,$4,0,0,45* |
21,0,$3,$4,0,0,135* |
% |
* |
* |
G04 Annular Aperture macro.* |
%AMANN* |
1,1,$1,0,0* |
1,0,$2,0,0* |
% |
* |
* |
G04 Odd Aperture macro.* |
%AMODD* |
1,1,$1,0,0* |
1,0,$1-0.005,0,0* |
% |
* |
* |
G04 PC Custom Aperture Macros* |
* |
* |
* |
* |
* |
* |
G04 PC Aperture Table* |
* |
%ADD024C,0.001*% |
%ADD043R,0.055X0.055*% |
%ADD060R,0.07693X0.07693*% |
%ADD061R,0.06118X0.06118*% |
%ADD062R,0.071X0.071*% |
%ADD063C,0.081*% |
%ADD064C,0.05528*% |
%ADD065C,0.11079*% |
%ADD066R,0.081X0.081*% |
%ADD067R,0.076X0.076*% |
%ADD068R,0.086X0.086*% |
%ADD069C,0.041*% |
%ADD070R,0.09465X0.09465*% |
%ADD071C,0.25213*% |
%ADD072C,0.21*% |
%ADD073R,0.059X0.059*% |
* |
* |
* |
* |
G04 PC Circuitry* |
G04 Layer Name CLKGEN.pcb - circuitry* |
%LPD*% |
* |
* |
G04 PC Custom Flashes* |
G04 Layer Name CLKGEN.pcb - flashes* |
%LPD*% |
* |
* |
G04 PC Circuitry* |
G04 Layer Name CLKGEN.pcb - circuitry* |
%LPD*% |
* |
G54D24* |
G54D43* |
G01X203000Y246450D02* |
Y244750D01* |
X210600Y246450D02* |
Y244750D01* |
X203000Y255250D02* |
Y253550D01* |
X210600Y255250D02* |
Y253550D01* |
X245400Y227550D02* |
Y229250D01* |
X237800Y227550D02* |
Y229250D01* |
X137408Y226261D02* |
X135708D01* |
X137408Y218661D02* |
X135708D01* |
X174318Y228841D02* |
X173118D01* |
X174318Y221241D02* |
X173118D01* |
X185595Y207021D02* |
Y208221D01* |
X177995Y207021D02* |
Y208221D01* |
X137205Y210696D02* |
X136005D01* |
X137205Y203096D02* |
X136005D01* |
X154958Y217661D02* |
X156158D01* |
X154958Y225261D02* |
X156158D01* |
X164958Y217661D02* |
X166158D01* |
X164958Y225261D02* |
X166158D01* |
X153517Y179275D02* |
X152317D01* |
X153517Y171675D02* |
X152317D01* |
X164067Y179275D02* |
X162867D01* |
X164067Y171675D02* |
X162867D01* |
X188438Y238422D02* |
Y237222D01* |
X196038Y238422D02* |
Y237222D01* |
X225000Y241800D02* |
Y243000D01* |
X217400Y241800D02* |
Y243000D01* |
G54D60* |
X227076Y213427D02* |
Y215198D01* |
X217076Y213427D02* |
Y215198D01* |
X207076Y213427D02* |
Y215198D01* |
Y229962D02* |
Y231734D01* |
X217076Y229962D02* |
Y231734D01* |
X227076Y229962D02* |
Y231734D01* |
G54D61* |
X228789Y222580D02* |
X227824D01* |
X206328D02* |
X205364D01* |
G54D62* |
X186884Y166138D02* |
Y170638D01* |
X173884Y166138D02* |
Y170638D01* |
X224689Y172049D02* |
Y167549D01* |
X237689Y172049D02* |
Y167549D01* |
G54D63* |
X173529Y134397D03* |
X163529D03* |
X173529Y144397D03* |
X163529D03* |
X173529Y154397D03* |
X163529D03* |
X251309Y187702D03* |
X261309D03* |
X251309Y177702D03* |
X261309D03* |
X251309Y167702D03* |
X261309D03* |
G54D64* |
X191403Y269381D02* |
Y268593D01* |
X196403Y263475D02* |
Y262688D01* |
X201403Y263475D02* |
Y262688D01* |
X206403Y269381D02* |
Y268593D01* |
X211403Y263475D02* |
Y262688D01* |
X216403Y263475D02* |
Y262688D01* |
X221403Y269381D02* |
Y268593D01* |
G54D65* |
X232230Y259144D03* |
X181718Y263081D03* |
G54D66* |
X220015Y201331D03* |
Y191331D03* |
X210020Y201331D03* |
Y191331D03* |
X152637Y188800D03* |
Y198800D03* |
X162637Y188800D03* |
Y198800D03* |
G54D67* |
X221002Y136510D02* |
Y135310D01* |
X202802Y136510D02* |
Y135310D01* |
X211902Y136510D02* |
Y135310D01* |
G54D68* |
X215752Y160310D02* |
X208052D01* |
G54D69* |
X146058Y234411D02* |
Y229911D01* |
X151058Y234411D02* |
Y229911D01* |
X156058Y234411D02* |
Y229911D01* |
X161058Y234411D02* |
Y229911D01* |
Y213011D02* |
Y208511D01* |
X156058Y213011D02* |
Y208511D01* |
X151058Y213011D02* |
Y208511D01* |
X146058Y213011D02* |
Y208511D01* |
G54D70* |
X190262Y156326D02* |
Y155933D01* |
Y136247D02* |
Y135854D01* |
X233542Y156326D02* |
Y155933D01* |
Y136247D02* |
Y135854D01* |
G54D71* |
X140000Y260000D03* |
Y140000D03* |
X260000D03* |
Y260000D03* |
G54D72* |
X200800Y170400D03* |
X178800Y188000D03* |
G54D73* |
X184280Y230140D02* |
Y227440D01* |
X195680Y230140D02* |
Y227440D01* |
X0Y0D02* |
M02* |
/Modules/Clock/CLKGEN01A/CAM_PROFI/V2.PHO |
---|
0,0 → 1,2043 |
* |
* |
G04 PADS9.0.2 Build Number: 372616 generated Gerber (RS-274-X) file* |
G04 PC Version=2.1* |
* |
%IN "CLKGEN.pcb"*% |
* |
%MOIN*% |
* |
%FSLAX35Y35*% |
* |
* |
* |
* |
G04 PC Standard Apertures* |
* |
* |
G04 Thermal Relief Aperture macro.* |
%AMTER* |
1,1,$1,0,0* |
1,0,$1-$2,0,0* |
21,0,$3,$4,0,0,45* |
21,0,$3,$4,0,0,135* |
% |
* |
* |
G04 Annular Aperture macro.* |
%AMANN* |
1,1,$1,0,0* |
1,0,$2,0,0* |
% |
* |
* |
G04 Odd Aperture macro.* |
%AMODD* |
1,1,$1,0,0* |
1,0,$1-0.005,0,0* |
% |
* |
* |
G04 PC Custom Aperture Macros* |
* |
* |
* |
* |
* |
* |
G04 PC Aperture Table* |
* |
%ADD010R,0.039X0.039*% |
%ADD012R,0.07X0.07*% |
%ADD013C,0.23622*% |
%ADD014C,0.05*% |
%ADD017C,0.02*% |
%ADD020C,0.012*% |
%ADD024C,0.001*% |
%ADD025C,0.01*% |
%ADD040R,0.06X0.06*% |
%ADD043R,0.055X0.055*% |
%ADD045R,0.065X0.065*% |
%ADD046R,0.043X0.043*% |
%ADD047C,0.025*% |
%ADD055C,0.04331*% |
%ADD056C,0.09843*% |
%ADD057R,0.06693X0.06693*% |
%ADD058R,0.05118X0.05118*% |
%ADD059R,0.07874X0.07874*% |
* |
* |
* |
* |
G04 PC Circuitry* |
G04 Layer Name CLKGEN.pcb - circuitry* |
%LPD*% |
* |
* |
G04 PC Custom Flashes* |
G04 Layer Name CLKGEN.pcb - flashes* |
%LPD*% |
* |
* |
G04 PC Circuitry* |
G04 Layer Name CLKGEN.pcb - circuitry* |
%LPD*% |
* |
G54D10* |
G01X203000Y246450D02* |
Y244750D01* |
X210600Y246450D02* |
Y244750D01* |
X203000Y255250D02* |
Y253550D01* |
X210600Y255250D02* |
Y253550D01* |
X245400Y227550D02* |
Y229250D01* |
X237800Y227550D02* |
Y229250D01* |
X137408Y226261D02* |
X135708D01* |
X137408Y218661D02* |
X135708D01* |
X174318Y228841D02* |
X173118D01* |
X174318Y221241D02* |
X173118D01* |
X185595Y207021D02* |
Y208221D01* |
X177995Y207021D02* |
Y208221D01* |
X137205Y210696D02* |
X136005D01* |
X137205Y203096D02* |
X136005D01* |
X154958Y217661D02* |
X156158D01* |
X154958Y225261D02* |
X156158D01* |
X164958Y217661D02* |
X166158D01* |
X164958Y225261D02* |
X166158D01* |
X153517Y179275D02* |
X152317D01* |
X153517Y171675D02* |
X152317D01* |
X164067Y179275D02* |
X162867D01* |
X164067Y171675D02* |
X162867D01* |
X188438Y238422D02* |
Y237222D01* |
X196038Y238422D02* |
Y237222D01* |
X225000Y241800D02* |
Y243000D01* |
X217400Y241800D02* |
Y243000D01* |
G54D12* |
X215752Y160310D02* |
X208052D01* |
G54D13* |
X140000Y260000D03* |
Y140000D03* |
X260000D03* |
Y260000D03* |
G54D14* |
X200800Y170400D03* |
G54D17* |
X202802Y135910D02* |
Y143393D01* |
X190262Y155933* |
Y156129* |
X211902Y135910D02* |
Y160310D01* |
X163529Y144397D02* |
X158000Y149925D01* |
Y160800* |
X163467Y166267* |
Y171675* |
X173529Y144397D02* |
X163529D01* |
X190262Y156129D02* |
X187998D01* |
Y168388* |
X186884* |
X233542Y156129D02* |
X231671Y158000D01* |
X230400* |
Y161889* |
X224689Y167600* |
Y169246* |
X186884Y168388D02* |
Y170638D01* |
X181921Y175600* |
X211902Y160310D02* |
X215752D01* |
X224689Y169246* |
Y169799* |
X163467Y171675D02* |
X152917D01* |
X152317* |
X136605Y187387* |
Y203096* |
X152917Y179275D02* |
X152637D01* |
Y188800* |
X163467Y171675D02* |
Y172625D01* |
X165017* |
X168000Y173366* |
X170234Y175600* |
X181921* |
X163467Y179275D02* |
X162637D01* |
Y188800* |
X224689Y172049D02* |
X230342Y177702D01* |
X238000* |
X224689Y172049D02* |
X214338Y182400D01* |
X202616* |
X177995Y207021* |
Y207621* |
X251309Y177702D02* |
X238000D01* |
Y178200* |
X237800Y178400* |
Y228400* |
X261309Y177702D02* |
X251309D01* |
X152637Y188800D02* |
Y198800D01* |
X162637Y188800D02* |
Y198800D01* |
X223896Y185600D02* |
X232834Y194538D01* |
Y219245* |
X223896Y185600D02* |
X206139D01* |
X196800Y194939* |
Y195816* |
X185595Y207021* |
Y207621* |
X152637Y198800D02* |
X154047D01* |
Y203650* |
X155197Y204800* |
X155200* |
X156058Y205658* |
Y210761* |
X162637Y198800D02* |
X161058D01* |
Y210761* |
X210020Y191331D02* |
Y201331D01* |
X220015Y191331D02* |
Y201331D01* |
X177995Y207621D02* |
Y217565D01* |
X174318Y221241* |
X173718* |
X210020Y201331D02* |
X217076Y208387D01* |
Y214312* |
X220015Y201331D02* |
X227076Y208392D01* |
Y214312* |
X146058Y210761D02* |
X136605D01* |
Y218661* |
X136558* |
X136605Y210696D02* |
Y210761D01* |
X146058D02* |
X151058D01* |
X156058D02* |
Y217661D01* |
X155558* |
X161058Y210761D02* |
Y213011D01* |
X164765Y217661* |
X165558* |
X232834Y219245D02* |
X229144Y222935D01* |
X228307* |
X155558Y225261D02* |
X156058D01* |
Y232161* |
X173718Y228841D02* |
X173118D01* |
X163960Y238000* |
X184280Y228790D02* |
X173718D01* |
Y228841* |
X205846Y222580D02* |
X200540D01* |
X195680Y227440* |
Y228790* |
X228307Y222580D02* |
Y222935D01* |
X237800Y228400D02* |
X234000D01* |
X233200Y229200* |
Y230048* |
X232400Y230848* |
X227076* |
X156058Y232161D02* |
Y234411D01* |
X159647Y238000* |
X163960* |
G54D20* |
X185595Y207621D02* |
Y216410D01* |
X176964Y225041* |
X170000* |
X169780Y225261* |
X165558* |
X164651* |
X163608Y226611* |
X161058Y229911* |
Y232161* |
X173718Y221241D02* |
X169495D01* |
X169276Y221461* |
X152312* |
X151058Y222715* |
Y232161* |
X196038Y237822D02* |
Y238105D01* |
X203000Y245067* |
Y245600* |
X207076Y230848D02* |
Y231734D01* |
X200988Y237822* |
X196038* |
X217076Y230848D02* |
Y241676D01* |
X217400Y242000* |
X203000Y245600D02* |
Y246450D01* |
X196403Y253047* |
Y263081* |
X210600Y240800D02* |
X208000D01* |
X206800Y242000* |
Y249750* |
X203000Y253550* |
Y254400* |
X210600Y240800D02* |
X215600D01* |
X216800Y242000* |
X217400* |
X210600Y245600D02* |
Y246450D01* |
X216403Y252253* |
Y263081* |
X217400Y242000D02* |
Y242400D01* |
X203000Y254400D02* |
X202600Y254800D01* |
X201403* |
Y263081* |
X210600Y254400D02* |
X211046D01* |
Y263081* |
X211403* |
G54D24* |
G54D25* |
X272400Y236873D02* |
X271900Y237055D01* |
X271400Y237418* |
X271150Y237782* |
Y238509* |
X271400Y238873* |
X271900Y239236* |
X272400Y239418* |
X273150Y239600* |
X274400* |
X275150Y239418* |
X275650Y239236* |
X276150Y238873* |
X276400Y238509* |
Y237782* |
X276150Y237418* |
X275650Y237055* |
X275150Y236873* |
X271150Y235236D02* |
X276400D01* |
Y233055* |
X271150Y231418D02* |
X276400D01* |
X271150Y228873D02* |
X274650Y231418D01* |
X273400Y230509D02* |
X276400Y228873D01* |
X272400Y224509D02* |
X271900Y224691D01* |
X271400Y225055* |
X271150Y225418* |
Y226145* |
X271400Y226509* |
X271900Y226873* |
X272400Y227055* |
X273150Y227236* |
X274400* |
X275150Y227055* |
X275650Y226873* |
X276150Y226509* |
X276400Y226145* |
Y225418* |
X276150Y225055* |
X275650Y224691* |
X275150Y224509* |
X274400* |
Y225418D02* |
Y224509D01* |
X271150Y222873D02* |
X276400D01* |
X271150D02* |
Y220509D01* |
X273650Y222873D02* |
Y221418D01* |
X276400Y222873D02* |
Y220509D01* |
X271150Y218873D02* |
X276400D01* |
X271150D02* |
X276400Y216327D01* |
X271150D02* |
X276400D01* |
X271150Y213600D02* |
X271400Y214145D01* |
X272150Y214509* |
X273400Y214691* |
X274150* |
X275400Y214509* |
X276150Y214145* |
X276400Y213600* |
Y213236* |
X276150Y212691* |
X275400Y212327* |
X274150Y212145* |
X273400* |
X272150Y212327* |
X271400Y212691* |
X271150Y213236* |
Y213600* |
X272150Y210509D02* |
X271900Y210145D01* |
X271150Y209600* |
X276400* |
X271150Y206509D02* |
X276400Y207964D01* |
X271150Y206509D02* |
X276400Y205055D01* |
X274650Y207418D02* |
Y205600D01* |
X277300Y242300D02* |
Y276800D01* |
G75* |
G03X276800Y277300I-500J-0D01* |
G01X123200* |
G03X122700Y276800I0J-500* |
G01Y123200* |
G03X123200Y122700I500J0* |
G01X276800* |
G03X277300Y123200I-0J500* |
G01Y201627* |
G03X276800Y202127I-500J0* |
G01X269650* |
X267950Y203827D02* |
G03X269650Y202127I1700J0D01* |
G01X267950Y203827D02* |
Y240100D01* |
X269650Y241800D02* |
G03X267950Y240100I0J-1700D01* |
G01X269650Y241800D02* |
X276800D01* |
G03X277300Y242300I-0J500* |
G01X266259Y180952D02* |
Y174452D01* |
X264559Y172752D02* |
G03X266259Y174452I0J1700D01* |
G01X264559Y172752D02* |
X258059D01* |
X256707Y173422D02* |
G03X258059Y172752I1352J1030D01* |
G01X256707Y173422D02* |
G03X255911I-398J-303D01* |
G01X254559Y172752D02* |
G03X255911Y173422I0J1700D01* |
G01X254559Y172752D02* |
X248059D01* |
X246359Y174452D02* |
G03X248059Y172752I1700J0D01* |
G01X246359Y174452D02* |
Y174502D01* |
G03X245859Y175002I-500J0* |
G01X238000* |
X231667* |
G03X231314Y174856I0J-500* |
G01X229285Y172827* |
G03X229139Y172474I354J-353* |
G01Y167175* |
G03X229285Y166822I500J0* |
G01X232309Y163798* |
X233056Y162373D02* |
G03X232309Y163798I-2656J-484D01* |
G01X233056Y162374D02* |
G03X233548Y161963I492J89D01* |
G01X237479* |
X239179Y160263D02* |
G03X237479Y161963I-1700J0D01* |
G01X239179Y160263D02* |
Y151996D01* |
X237479Y150296D02* |
G03X239179Y151996I-0J1700D01* |
G01X237479Y150296D02* |
X229605D01* |
X227905Y151996D02* |
G03X229605Y150296I1700J-0D01* |
G01X227905Y151996D02* |
Y156873D01* |
G03X227873Y157049I-500J0* |
G01X227700Y158000D02* |
G03X227873Y157049I2700J0D01* |
G01X227700Y158000D02* |
Y160563D01* |
G03X227554Y160917I-500J0* |
G01X225518Y162953* |
G03X225164Y163099I-354J-354* |
G01X222567* |
G03X222213Y162953I-0J-500* |
G01X221099Y161838* |
G03X220952Y161484I353J-354* |
G01Y156810* |
X219252Y155110D02* |
G03X220952Y156810I0J1700D01* |
G01X219252Y155110D02* |
X215102D01* |
G03X214602Y154610I0J-500* |
G01Y141701* |
G03X215057Y141203I500J-0* |
G01X216602Y139510D02* |
G03X215057Y141203I-1700J-0D01* |
G01X216602Y139510D02* |
Y132310D01* |
X214902Y130610D02* |
G03X216602Y132310I0J1700D01* |
G01X214902Y130610D02* |
X208902D01* |
X207704Y131103D02* |
G03X208902Y130610I1198J1207D01* |
G01X207704Y131103D02* |
G03X207000I-352J-355D01* |
G01X205802Y130610D02* |
G03X207000Y131103I0J1700D01* |
G01X205802Y130610D02* |
X199802D01* |
X198102Y132310D02* |
G03X199802Y130610I1700J-0D01* |
G01X198102Y132310D02* |
Y139510D01* |
X199648Y141203D02* |
G03X198102Y139510I154J-1693D01* |
G01X199648Y141203D02* |
G03X200102Y141701I-46J498D01* |
G01Y142067* |
G03X199956Y142421I-500J0* |
G01X192227Y150149* |
G03X191874Y150296I-353J-353* |
G01X186325* |
X184625Y151996D02* |
G03X186325Y150296I1700J-0D01* |
G01X184625Y151996D02* |
Y160263D01* |
X184783Y160978D02* |
G03X184625Y160263I1542J-715D01* |
G01X184783Y160978D02* |
G03X184329Y161688I-454J210D01* |
G01X184134* |
X182434Y163388D02* |
G03X184134Y161688I1700J-0D01* |
G01X182434Y163388D02* |
Y171062D01* |
G03X182287Y171416I-500J0* |
G01X180949Y172754* |
G03X180596Y172900I-353J-354* |
G01X171560* |
G03X171206Y172754I-0J-500* |
G01X169909Y171456* |
X168651Y170745D02* |
G03X169909Y171456I-651J2621D01* |
G01X168651Y170745D02* |
X168097Y170608D01* |
G03X167717Y170122I120J-486* |
G01Y169725* |
X166520Y168101D02* |
G03X167717Y169725I-503J1624D01* |
G01X166520Y168101D02* |
G03X166167Y167623I147J-478D01* |
G01Y166267* |
X165377Y164358D02* |
G03X166167Y166267I-1910J1909D01* |
G01X165377Y164358D02* |
X160846Y159828D01* |
G03X160700Y159475I354J-353* |
G01Y151251* |
G03X160846Y150897I500J-0* |
G01X162251Y149493* |
G03X162604Y149347I353J354* |
G01X166779* |
X168131Y148677D02* |
G03X166779Y149347I-1352J-1030D01* |
G01X168131Y148677D02* |
G03X168927I398J303D01* |
G01X170279Y149347D02* |
G03X168927Y148677I-0J-1700D01* |
G01X170279Y149347D02* |
X176779D01* |
X178479Y147647D02* |
G03X176779Y149347I-1700J-0D01* |
G01X178479Y147647D02* |
Y141147D01* |
X176779Y139446D02* |
G03X178479Y141147I-0J1701D01* |
G01X176779Y139446D02* |
X170279D01* |
X168927Y140116D02* |
G03X170279Y139446I1352J1031D01* |
G01X168927Y140116D02* |
G03X168131I-398J-303D01* |
G01X166779Y139446D02* |
G03X168131Y140116I-0J1701D01* |
G01X166779Y139446D02* |
X160279D01* |
X158579Y141147D02* |
G03X160279Y139446I1700J-0D01* |
G01X158579Y141147D02* |
Y145321D01* |
G03X158433Y145675I-500J0* |
G01X156091Y148016* |
X155300Y149925D02* |
G03X156091Y148016I2700J0D01* |
G01X155300Y149925D02* |
Y160800D01* |
X156091Y162709D02* |
G03X155300Y160800I1909J-1909D01* |
G01X156091Y162709D02* |
X160621Y167239D01* |
G03X160767Y167593I-354J354* |
G01Y167623* |
G03X160415Y168101I-500J0* |
G01X159518Y168759D02* |
G03X160415Y168101I1399J966D01* |
G01X159518Y168759D02* |
G03X159107Y168975I-411J-284D01* |
G01X157277* |
G03X156866Y168759I0J-500* |
G01X155467Y168025D02* |
G03X156866Y168759I-0J1700D01* |
G01X155467Y168025D02* |
X150367D01* |
X148667Y169725D02* |
G03X150367Y168025I1700J-0D01* |
G01X148667Y169725D02* |
Y171299D01* |
G03X148520Y171653I-500J0* |
G01X134696Y185478* |
X133905Y187387D02* |
G03X134696Y185478I2700J-0D01* |
G01X133905Y187387D02* |
Y199044D01* |
G03X133552Y199522I-500J-0* |
G01X132355Y201146D02* |
G03X133552Y199522I1700J-0D01* |
G01X132355Y201146D02* |
Y205046D01* |
X133135Y206475D02* |
G03X132355Y205046I920J-1429D01* |
G01X133135Y206475D02* |
G03Y207316I-271J421D01* |
G01X132355Y208746D02* |
G03X133135Y207316I1700J-0D01* |
G01X132355Y208746D02* |
Y212646D01* |
X133301Y214170D02* |
G03X132355Y212646I754J-1524D01* |
G01X133301Y214170D02* |
G03X133234Y215093I-222J448D01* |
G01X132058Y216711D02* |
G03X133234Y215093I1700J-0D01* |
G01X132058Y216711D02* |
Y220611D01* |
X133758Y222311D02* |
G03X132058Y220611I-0J-1700D01* |
G01X133758Y222311D02* |
X139358D01* |
X141058Y220611D02* |
G03X139358Y222311I-1700J-0D01* |
G01X141058Y220611D02* |
Y216711D01* |
X139924Y215108D02* |
G03X141058Y216711I-566J1603D01* |
G01X139924Y215108D02* |
G03X139878Y214184I167J-471D01* |
G01X140518Y213662D02* |
G03X139878Y214184I-1363J-1016D01* |
G01X140518Y213662D02* |
G03X140919Y213461I401J299D01* |
G01X142741* |
G03X143222Y213823I-0J500* |
G01X148195Y215044D02* |
G03X143222Y213823I-2137J-2033D01* |
G01X148195Y215044D02* |
G03X148920I363J344D01* |
G01X150844Y215953D02* |
G03X148920Y215044I214J-2942D01* |
G01X150844Y215953D02* |
G03X151308Y216452I-36J499D01* |
G01Y219099* |
G03X151076Y219521I-500J0* |
G01X150686Y219834D02* |
G03X151076Y219521I1626J1627D01* |
G01X150686Y219834D02* |
X149431Y221089D01* |
X148758Y222715D02* |
G03X149431Y221089I2300J0D01* |
G01X148758Y222715D02* |
Y227895D01* |
G03X148663Y228187I-500J0* |
G01X148108Y229911D02* |
G03X148663Y228187I2950J-0D01* |
G01X148108Y229911D02* |
Y234411D01* |
X153195Y236444D02* |
G03X148108Y234411I-2137J-2033D01* |
G01X153195Y236444D02* |
G03X153920I363J344D01* |
G01X154902Y237125D02* |
G03X153920Y236444I1156J-2714D01* |
G01X154902Y237125D02* |
G03X155060Y237232I-195J460D01* |
G01X157738Y239909* |
X159647Y240700D02* |
G03X157738Y239909I-0J-2700D01* |
G01X159647Y240700D02* |
X163960D01* |
X165869Y239909D02* |
G03X163960Y240700I-1909J-1909D01* |
G01X165869Y239909D02* |
X173140Y232638D01* |
G03X173494Y232491I354J353* |
G01X176268* |
X177694Y231717D02* |
G03X176268Y232491I-1426J-926D01* |
G01X177694Y231717D02* |
G03X178113Y231490I419J273D01* |
G01X179930* |
G03X180430Y231990I0J500* |
G01Y232290* |
X182130Y233990D02* |
G03X180430Y232290I0J-1700D01* |
G01X182130Y233990D02* |
X186430D01* |
X188130Y232290D02* |
G03X186430Y233990I-1700J-0D01* |
G01X188130Y232290D02* |
Y225290D01* |
X186430Y223590D02* |
G03X188130Y225290I0J1700D01* |
G01X186430Y223590D02* |
X182875D01* |
G03X182522Y222736I0J-500* |
G01X187221Y218037* |
X187895Y216410D02* |
G03X187221Y218037I-2300J0D01* |
G01X187895Y216410D02* |
Y212200D01* |
G03X188202Y211739I500J-0* |
G01X189245Y210171D02* |
G03X188202Y211739I-1700J-0D01* |
G01X189245Y210171D02* |
Y207396D01* |
G03X189391Y207043I500J0* |
G01X198709Y197725* |
X199469Y196226D02* |
G03X198709Y197725I-2669J-410D01* |
G01X199469Y196226D02* |
G03X199609Y195949I494J76D01* |
G01X204216Y191341* |
G03X205070Y191695I354J354* |
G01Y194581* |
X205740Y195933D02* |
G03X205070Y194581I1030J-1352D01* |
G01X205740Y195933D02* |
G03Y196728I-303J398D01* |
G01X205070Y198081D02* |
G03X205740Y196728I1700J-0D01* |
G01X205070Y198081D02* |
Y204581D01* |
X206770Y206281D02* |
G03X205070Y204581I-0J-1700D01* |
G01X206770Y206281D02* |
X210944D01* |
G03X211298Y206427I0J500* |
G01X212806Y207935* |
G03X212743Y208696I-354J354* |
G01X212030Y210080D02* |
G03X212743Y208696I1700J0D01* |
G01X212030Y210080D02* |
Y218545D01* |
X213730Y220245D02* |
G03X212030Y218545I-0J-1700D01* |
G01X213730Y220245D02* |
X220423D01* |
X221700Y219666D02* |
G03X220423Y220245I-1277J-1121D01* |
G01X221700Y219666D02* |
G03X222452I376J330D01* |
G01X223216Y220165D02* |
G03X222452Y219666I514J-1620D01* |
G01X223216Y220165D02* |
G03X223565Y220642I-151J477D01* |
G01Y224518* |
G03X223216Y224995I-500J0* |
G01X222452Y225494D02* |
G03X223216Y224995I1278J1122D01* |
G01X222452Y225494D02* |
G03X221700I-376J-330D01* |
G01X220423Y224916D02* |
G03X221700Y225494I-0J1700D01* |
G01X220423Y224916D02* |
X213730D01* |
X212452Y225494D02* |
G03X213730Y224916I1278J1122D01* |
G01X212452Y225494D02* |
G03X211700I-376J-330D01* |
G01X210936Y224995D02* |
G03X211700Y225494I-513J1621D01* |
G01X210936Y224995D02* |
G03X210587Y224518I151J-477D01* |
G01Y220021* |
X208887Y218321D02* |
G03X210587Y220021I0J1700D01* |
G01X208887Y218321D02* |
X202805D01* |
X201178Y219526D02* |
G03X202805Y218321I1627J495D01* |
G01X201178Y219526D02* |
G03X200700Y219880I-478J-146D01* |
G01X200540* |
X198630Y220671D02* |
G03X200540Y219880I1910J1909D01* |
G01X198630Y220671D02* |
X195858Y223443D01* |
G03X195505Y223590I-353J-353* |
G01X193530* |
X191830Y225290D02* |
G03X193530Y223590I1700J-0D01* |
G01X191830Y225290D02* |
Y232290D01* |
X192535Y233668D02* |
G03X191830Y232290I995J-1378D01* |
G01X192535Y233668D02* |
G03X192662Y234346I-292J406D01* |
G01X192388Y235272D02* |
G03X192662Y234346I1700J-0D01* |
G01X192388Y235272D02* |
Y240372D01* |
X194088Y242072D02* |
G03X192388Y240372I0J-1700D01* |
G01X194088Y242072D02* |
X196545D01* |
G03X196899Y242218I0J500* |
G01X199204Y244523* |
G03X199350Y244877I-354J354* |
G01Y246640* |
G03X199204Y246994I-500J0* |
G01X194777Y251421* |
X194103Y253047D02* |
G03X194777Y251421I2300J0D01* |
G01X194103Y253047D02* |
Y259339D01* |
G03X193924Y259722I-500J-0* |
G01X192538Y262688D02* |
G03X193924Y259722I3865J-0D01* |
G01X192538Y262688D02* |
Y263475D01* |
X198617Y266644D02* |
G03X192538Y263475I-2214J-3169D01* |
G01X198617Y266644D02* |
G03X199189I286J410D01* |
G01X205268Y263475D02* |
G03X199189Y266644I-3865J0D01* |
G01X205268Y263475D02* |
Y262688D01* |
X203946Y259777D02* |
G03X205268Y262688I-2543J2911D01* |
G01X203946Y259777D02* |
G03X204275Y258900I329J-377D01* |
G01X204950* |
X206380Y258120D02* |
G03X204950Y258900I-1430J-920D01* |
G01X206380Y258120D02* |
G03X207220I420J271D01* |
G01X208338Y258871D02* |
G03X207220Y258120I312J-1671D01* |
G01X208338Y258871D02* |
G03X208746Y259363I-92J492D01* |
G01Y259673* |
G03X208608Y260018I-500J-0* |
G01X207538Y262688D02* |
G03X208608Y260018I3865J-0D01* |
G01X207538Y262688D02* |
Y263475D01* |
X213617Y266644D02* |
G03X207538Y263475I-2214J-3169D01* |
G01X213617Y266644D02* |
G03X214189I286J410D01* |
G01X220268Y263475D02* |
G03X214189Y266644I-3865J0D01* |
G01X220268Y263475D02* |
Y262688D01* |
X218882Y259722D02* |
G03X220268Y262688I-2479J2966D01* |
G01X218882Y259722D02* |
G03X218703Y259339I321J-383D01* |
G01Y252253* |
X218029Y250627D02* |
G03X218703Y252253I-1626J1626D01* |
G01X218029Y250627D02* |
X214897Y247495D01* |
G03X215296Y246643I354J-354* |
G01X215450Y246650D02* |
G03X215296Y246643I0J-1700D01* |
G01X215450Y246650D02* |
X219350D01* |
X221050Y244950D02* |
G03X219350Y246650I-1700J0D01* |
G01X221050Y244950D02* |
Y239850D01* |
X219757Y238199D02* |
G03X221050Y239850I-407J1651D01* |
G01X219757Y238199D02* |
G03X219376Y237714I119J-485D01* |
G01Y237280* |
G03X219876Y236780I500J0* |
G01X220423* |
X221700Y236201D02* |
G03X220423Y236780I-1277J-1121D01* |
G01X221700Y236201D02* |
G03X222452I376J330D01* |
G01X223730Y236780D02* |
G03X222452Y236201I-0J-1700D01* |
G01X223730Y236780D02* |
X230423D01* |
X232123Y235080D02* |
G03X230423Y236780I-1700J0D01* |
G01X232123Y235080D02* |
Y234040D01* |
G03X232588Y233541I500J0* |
G01X234309Y232757D02* |
G03X232588Y233541I-1909J-1909D01* |
G01X234309Y232757D02* |
X234345Y232721D01* |
G03X234960Y232649I354J354* |
G01X235850Y232900D02* |
G03X234960Y232649I0J-1700D01* |
G01X235850Y232900D02* |
X239750D01* |
X241450Y231200D02* |
G03X239750Y232900I-1700J0D01* |
G01X241450Y231200D02* |
Y225600D01* |
X240716Y224201D02* |
G03X241450Y225600I-966J1399D01* |
G01X240716Y224201D02* |
G03X240500Y223790I284J-411D01* |
G01Y180902* |
G03X241000Y180402I500J0* |
G01X245859* |
G03X246359Y180902I0J500* |
G01Y180952* |
X248059Y182652D02* |
G03X246359Y180952I0J-1700D01* |
G01X248059Y182652D02* |
X254559D01* |
X255911Y181982D02* |
G03X254559Y182652I-1352J-1030D01* |
G01X255911Y181982D02* |
G03X256707I398J303D01* |
G01X258059Y182652D02* |
G03X256707Y181982I0J-1700D01* |
G01X258059Y182652D02* |
X264559D01* |
X266259Y180952D02* |
G03X264559Y182652I-1700J0D01* |
G01X122700Y276599D02* |
X277300D01* |
X122700Y275699D02* |
X277300D01* |
X122700Y274799D02* |
X277300D01* |
X122700Y273899D02* |
X277300D01* |
X122700Y272999D02* |
X277300D01* |
X122700Y272099D02* |
X277300D01* |
X122700Y271199D02* |
X277300D01* |
X122700Y270299D02* |
X277300D01* |
X122700Y269399D02* |
X277300D01* |
X122700Y268499D02* |
X277300D01* |
X122700Y267599D02* |
X277300D01* |
X218536Y266699D02* |
X277300D01* |
X219492Y265799D02* |
X277300D01* |
X219997Y264899D02* |
X277300D01* |
X220233Y263999D02* |
X277300D01* |
X220268Y263099D02* |
X277300D01* |
X220237Y262199D02* |
X277300D01* |
X220010Y261299D02* |
X277300D01* |
X219518Y260399D02* |
X277300D01* |
X218729Y259499D02* |
X277300D01* |
X218703Y258599D02* |
X277300D01* |
X218703Y257699D02* |
X277300D01* |
X218703Y256799D02* |
X277300D01* |
X218703Y255899D02* |
X277300D01* |
X218703Y254999D02* |
X277300D01* |
X218703Y254099D02* |
X277300D01* |
X218703Y253199D02* |
X277300D01* |
X218703Y252299D02* |
X277300D01* |
X218538Y251399D02* |
X277300D01* |
X217901Y250499D02* |
X277300D01* |
X217001Y249599D02* |
X277300D01* |
X216101Y248699D02* |
X277300D01* |
X215201Y247799D02* |
X277300D01* |
X214813Y246899D02* |
X277300D01* |
X220688Y245999D02* |
X277300D01* |
X221044Y245099D02* |
X277300D01* |
X221050Y244199D02* |
X277300D01* |
X221050Y243299D02* |
X277300D01* |
X221050Y242399D02* |
X277300D01* |
X240500Y200999D02* |
X277300D01* |
X240500Y200099D02* |
X277300D01* |
X240500Y199199D02* |
X277300D01* |
X240500Y198299D02* |
X277300D01* |
X240500Y197399D02* |
X277300D01* |
X240500Y196499D02* |
X277300D01* |
X240500Y195599D02* |
X277300D01* |
X240500Y194699D02* |
X277300D01* |
X240500Y193799D02* |
X277300D01* |
X240500Y192899D02* |
X277300D01* |
X240500Y191999D02* |
X277300D01* |
X240500Y191099D02* |
X277300D01* |
X240500Y190199D02* |
X277300D01* |
X240500Y189299D02* |
X277300D01* |
X240500Y188399D02* |
X277300D01* |
X240500Y187499D02* |
X277300D01* |
X240500Y186599D02* |
X277300D01* |
X240500Y185699D02* |
X277300D01* |
X240500Y184799D02* |
X277300D01* |
X240500Y183899D02* |
X277300D01* |
X240500Y182999D02* |
X277300D01* |
X265814Y182099D02* |
X277300D01* |
X266241Y181199D02* |
X277300D01* |
X266259Y180299D02* |
X277300D01* |
X266259Y179399D02* |
X277300D01* |
X266259Y178499D02* |
X277300D01* |
X266259Y177599D02* |
X277300D01* |
X266259Y176699D02* |
X277300D01* |
X266259Y175799D02* |
X277300D01* |
X266259Y174899D02* |
X277300D01* |
X266198Y173999D02* |
X277300D01* |
X265588Y173099D02* |
X277300D01* |
X229139Y172199D02* |
X277300D01* |
X229139Y171299D02* |
X277300D01* |
X229139Y170399D02* |
X277300D01* |
X229139Y169499D02* |
X277300D01* |
X229139Y168599D02* |
X277300D01* |
X229139Y167699D02* |
X277300D01* |
X229308Y166799D02* |
X277300D01* |
X230208Y165899D02* |
X277300D01* |
X231108Y164999D02* |
X277300D01* |
X232008Y164099D02* |
X277300D01* |
X232761Y163199D02* |
X277300D01* |
X233076Y162299D02* |
X277300D01* |
X238744Y161399D02* |
X277300D01* |
X239163Y160499D02* |
X277300D01* |
X239179Y159599D02* |
X277300D01* |
X239179Y158699D02* |
X277300D01* |
X239179Y157799D02* |
X277300D01* |
X239179Y156899D02* |
X277300D01* |
X239179Y155999D02* |
X277300D01* |
X239179Y155099D02* |
X277300D01* |
X239179Y154199D02* |
X277300D01* |
X239179Y153299D02* |
X277300D01* |
X239179Y152399D02* |
X277300D01* |
X239105Y151499D02* |
X277300D01* |
X238448Y150599D02* |
X277300D01* |
X214602Y149699D02* |
X277300D01* |
X214602Y148799D02* |
X277300D01* |
X214602Y147899D02* |
X277300D01* |
X214602Y146999D02* |
X277300D01* |
X214602Y146099D02* |
X277300D01* |
X214602Y145199D02* |
X277300D01* |
X214602Y144299D02* |
X277300D01* |
X214602Y143399D02* |
X277300D01* |
X214602Y142499D02* |
X277300D01* |
X214613Y141599D02* |
X277300D01* |
X216117Y140699D02* |
X277300D01* |
X216577Y139799D02* |
X277300D01* |
X216602Y138899D02* |
X277300D01* |
X216602Y137999D02* |
X277300D01* |
X216602Y137099D02* |
X277300D01* |
X216602Y136199D02* |
X277300D01* |
X216602Y135299D02* |
X277300D01* |
X216602Y134399D02* |
X277300D01* |
X216602Y133499D02* |
X277300D01* |
X216602Y132599D02* |
X277300D01* |
X216489Y131699D02* |
X277300D01* |
X215681Y130799D02* |
X277300D01* |
X122700Y129899D02* |
X277300D01* |
X122700Y128999D02* |
X277300D01* |
X122700Y128099D02* |
X277300D01* |
X122700Y127199D02* |
X277300D01* |
X122700Y126299D02* |
X277300D01* |
X122700Y125399D02* |
X277300D01* |
X122700Y124499D02* |
X277300D01* |
X122700Y123599D02* |
X277300D01* |
X240500Y201899D02* |
X277220D01* |
X221050Y241499D02* |
X268684D01* |
X240500Y202799D02* |
X268296D01* |
X221050Y240599D02* |
X268025D01* |
X240500Y203699D02* |
X267955D01* |
X221043Y239699D02* |
X267950D01* |
X220686Y238799D02* |
X267950D01* |
X219412Y237899D02* |
X267950D01* |
X219463Y236999D02* |
X267950D01* |
X231784Y236099D02* |
X267950D01* |
X232119Y235199D02* |
X267950D01* |
X232123Y234299D02* |
X267950D01* |
X233285Y233399D02* |
X267950D01* |
X240847Y232499D02* |
X267950D01* |
X241403Y231599D02* |
X267950D01* |
X241450Y230699D02* |
X267950D01* |
X241450Y229799D02* |
X267950D01* |
X241450Y228899D02* |
X267950D01* |
X241450Y227999D02* |
X267950D01* |
X241450Y227099D02* |
X267950D01* |
X241450Y226199D02* |
X267950D01* |
X241423Y225299D02* |
X267950D01* |
X240953Y224399D02* |
X267950D01* |
X240500Y223499D02* |
X267950D01* |
X240500Y222599D02* |
X267950D01* |
X240500Y221699D02* |
X267950D01* |
X240500Y220799D02* |
X267950D01* |
X240500Y219899D02* |
X267950D01* |
X240500Y218999D02* |
X267950D01* |
X240500Y218099D02* |
X267950D01* |
X240500Y217199D02* |
X267950D01* |
X240500Y216299D02* |
X267950D01* |
X240500Y215399D02* |
X267950D01* |
X240500Y214499D02* |
X267950D01* |
X240500Y213599D02* |
X267950D01* |
X240500Y212699D02* |
X267950D01* |
X240500Y211799D02* |
X267950D01* |
X240500Y210899D02* |
X267950D01* |
X240500Y209999D02* |
X267950D01* |
X240500Y209099D02* |
X267950D01* |
X240500Y208199D02* |
X267950D01* |
X240500Y207299D02* |
X267950D01* |
X240500Y206399D02* |
X267950D01* |
X240500Y205499D02* |
X267950D01* |
X240500Y204599D02* |
X267950D01* |
X255588Y173099D02* |
X257030D01* |
X255814Y182099D02* |
X256804D01* |
X229557Y173099D02* |
X247030D01* |
X240500Y182099D02* |
X246804D01* |
X230457Y173999D02* |
X246421D01* |
X240500Y181199D02* |
X246377D01* |
X231363Y174899D02* |
X246164D01* |
X214602Y150599D02* |
X228636D01* |
X214602Y151499D02* |
X227979D01* |
X220746Y155999D02* |
X227905D01* |
X214998Y155099D02* |
X227905D01* |
X214602Y154199D02* |
X227905D01* |
X214602Y153299D02* |
X227905D01* |
X214602Y152399D02* |
X227905D01* |
X220952Y156899D02* |
X227904D01* |
X220952Y157799D02* |
X227707D01* |
X220952Y160499D02* |
X227700D01* |
X220952Y159599D02* |
X227700D01* |
X220952Y158699D02* |
X227700D01* |
X220952Y161399D02* |
X227072D01* |
X221559Y162299D02* |
X226172D01* |
X210587Y224399D02* |
X223565D01* |
X210587Y223499D02* |
X223565D01* |
X210587Y222599D02* |
X223565D01* |
X210587Y221699D02* |
X223565D01* |
X210587Y220799D02* |
X223565D01* |
X221451Y219899D02* |
X222702D01* |
X221498Y225299D02* |
X222655D01* |
X221825Y236099D02* |
X222327D01* |
X213536Y266699D02* |
X214270D01* |
X189245Y208199D02* |
X212944D01* |
X210583Y219899D02* |
X212702D01* |
X211498Y225299D02* |
X212655D01* |
X189245Y209099D02* |
X212342D01* |
X189254Y207299D02* |
X212169D01* |
X210245Y218999D02* |
X212091D01* |
X189245Y209999D02* |
X212032D01* |
X187159Y218099D02* |
X212030D01* |
X187756Y217199D02* |
X212030D01* |
X187895Y216299D02* |
X212030D01* |
X187895Y215399D02* |
X212030D01* |
X187895Y214499D02* |
X212030D01* |
X187895Y213599D02* |
X212030D01* |
X187895Y212699D02* |
X212030D01* |
X188097Y211799D02* |
X212030D01* |
X189081Y210899D02* |
X212030D01* |
X190035Y206399D02* |
X211267D01* |
X203536Y266699D02* |
X209270D01* |
X203785Y259499D02* |
X208746D01* |
X204492Y265799D02* |
X208314D01* |
X204518Y260399D02* |
X208288D01* |
X206581Y130799D02* |
X208123D01* |
X204997Y264899D02* |
X207809D01* |
X205010Y261299D02* |
X207796D01* |
X205916Y258599D02* |
X207684D01* |
X205233Y263999D02* |
X207573D01* |
X205237Y262199D02* |
X207569D01* |
X205268Y263099D02* |
X207538D01* |
X199412Y196499D02* |
X205908D01* |
X199959Y195599D02* |
X205408D01* |
X190935Y205499D02* |
X205339D01* |
X198987Y197399D02* |
X205213D01* |
X200859Y194699D02* |
X205074D01* |
X191835Y204599D02* |
X205070D01* |
X192735Y203699D02* |
X205070D01* |
X193635Y202799D02* |
X205070D01* |
X194535Y201899D02* |
X205070D01* |
X195435Y200999D02* |
X205070D01* |
X196335Y200099D02* |
X205070D01* |
X197235Y199199D02* |
X205070D01* |
X198135Y198299D02* |
X205070D01* |
X201759Y193799D02* |
X205070D01* |
X202659Y192899D02* |
X205070D01* |
X203559Y191999D02* |
X205070D01* |
X186259Y218999D02* |
X201446D01* |
X185359Y219899D02* |
X200223D01* |
X178479Y141599D02* |
X200092D01* |
X178479Y142499D02* |
X199878D01* |
X122700Y245999D02* |
X199350D01* |
X122700Y245099D02* |
X199350D01* |
X122700Y246899D02* |
X199278D01* |
X198536Y266699D02* |
X199270D01* |
X122700Y130799D02* |
X199023D01* |
X178479Y143399D02* |
X198978D01* |
X122700Y244199D02* |
X198879D01* |
X178419Y140699D02* |
X198587D01* |
X184459Y220799D02* |
X198503D01* |
X122700Y247799D02* |
X198399D01* |
X122700Y131699D02* |
X198216D01* |
X177815Y139799D02* |
X198127D01* |
X122700Y138899D02* |
X198102D01* |
X122700Y137999D02* |
X198102D01* |
X122700Y137099D02* |
X198102D01* |
X122700Y136199D02* |
X198102D01* |
X122700Y135299D02* |
X198102D01* |
X122700Y134399D02* |
X198102D01* |
X122700Y133499D02* |
X198102D01* |
X122700Y132599D02* |
X198102D01* |
X178479Y144299D02* |
X198078D01* |
X122700Y243299D02* |
X197979D01* |
X183559Y221699D02* |
X197603D01* |
X122700Y248699D02* |
X197499D01* |
X178479Y145199D02* |
X197178D01* |
X122700Y242399D02* |
X197079D01* |
X182659Y222599D02* |
X196703D01* |
X122700Y249599D02* |
X196599D01* |
X178479Y146099D02* |
X196278D01* |
X182588Y223499D02* |
X195792D01* |
X122700Y250499D02* |
X195699D01* |
X178479Y146999D02* |
X195378D01* |
X122700Y251399D02* |
X194799D01* |
X178460Y147899D02* |
X194478D01* |
X122700Y266699D02* |
X194270D01* |
X122700Y252299D02* |
X194228D01* |
X122700Y258599D02* |
X194103D01* |
X122700Y257699D02* |
X194103D01* |
X122700Y256799D02* |
X194103D01* |
X122700Y255899D02* |
X194103D01* |
X122700Y254999D02* |
X194103D01* |
X122700Y254099D02* |
X194103D01* |
X122700Y253199D02* |
X194103D01* |
X122700Y259499D02* |
X194077D01* |
X178029Y148799D02* |
X193578D01* |
X122700Y265799D02* |
X193314D01* |
X122700Y260399D02* |
X193288D01* |
X122700Y241499D02* |
X192815D01* |
X122700Y264899D02* |
X192809D01* |
X122700Y261299D02* |
X192796D01* |
X171479Y234299D02* |
X192689D01* |
X162045Y149699D02* |
X192678D01* |
X122700Y263999D02* |
X192573D01* |
X122700Y262199D02* |
X192569D01* |
X122700Y263099D02* |
X192538D01* |
X164692Y240599D02* |
X192403D01* |
X170579Y235199D02* |
X192390D01* |
X166079Y239699D02* |
X192388D01* |
X166979Y238799D02* |
X192388D01* |
X167879Y237899D02* |
X192388D01* |
X168779Y236999D02* |
X192388D01* |
X169679Y236099D02* |
X192388D01* |
X187719Y233399D02* |
X192242D01* |
X187878Y224399D02* |
X192082D01* |
X188117Y232499D02* |
X191843D01* |
X188130Y231599D02* |
X191830D01* |
X188130Y230699D02* |
X191830D01* |
X188130Y229799D02* |
X191830D01* |
X188130Y228899D02* |
X191830D01* |
X188130Y227999D02* |
X191830D01* |
X188130Y227099D02* |
X191830D01* |
X188130Y226199D02* |
X191830D01* |
X188130Y225299D02* |
X191830D01* |
X161145Y150599D02* |
X185356D01* |
X162417Y161399D02* |
X184782D01* |
X160700Y151499D02* |
X184700D01* |
X161517Y160499D02* |
X184642D01* |
X160716Y159599D02* |
X184625D01* |
X160700Y158699D02* |
X184625D01* |
X160700Y157799D02* |
X184625D01* |
X160700Y156899D02* |
X184625D01* |
X160700Y155999D02* |
X184625D01* |
X160700Y155099D02* |
X184625D01* |
X160700Y154199D02* |
X184625D01* |
X160700Y153299D02* |
X184625D01* |
X160700Y152399D02* |
X184625D01* |
X163317Y162299D02* |
X182828D01* |
X164217Y163199D02* |
X182444D01* |
X167801Y170399D02* |
X182434D01* |
X167702Y169499D02* |
X182434D01* |
X167291Y168599D02* |
X182434D01* |
X166173Y167699D02* |
X182434D01* |
X166167Y166799D02* |
X182434D01* |
X166142Y165899D02* |
X182434D01* |
X165851Y164999D02* |
X182434D01* |
X165117Y164099D02* |
X182434D01* |
X169737Y171299D02* |
X182374D01* |
X170651Y172199D02* |
X181504D01* |
X172379Y233399D02* |
X180842D01* |
X173408Y232499D02* |
X180443D01* |
X177802Y231599D02* |
X180242D01* |
X167815Y139799D02* |
X169243D01* |
X168029Y148799D02* |
X169029D01* |
X122700Y167699D02* |
X160762D01* |
X122700Y166799D02* |
X160180D01* |
X156740Y168599D02* |
X159644D01* |
X122700Y165899D02* |
X159280D01* |
X122700Y139799D02* |
X159243D01* |
X122700Y240599D02* |
X158914D01* |
X122700Y140699D02* |
X158639D01* |
X122700Y145199D02* |
X158579D01* |
X122700Y144299D02* |
X158579D01* |
X122700Y143399D02* |
X158579D01* |
X122700Y142499D02* |
X158579D01* |
X122700Y141599D02* |
X158579D01* |
X122700Y164999D02* |
X158380D01* |
X122700Y146099D02* |
X158008D01* |
X122700Y239699D02* |
X157527D01* |
X122700Y164099D02* |
X157480D01* |
X122700Y146999D02* |
X157108D01* |
X122700Y238799D02* |
X156627D01* |
X122700Y163199D02* |
X156580D01* |
X122700Y147899D02* |
X156208D01* |
X122700Y162299D02* |
X155754D01* |
X122700Y237899D02* |
X155727D01* |
X122700Y148799D02* |
X155546D01* |
X122700Y161399D02* |
X155367D01* |
X122700Y149699D02* |
X155310D01* |
X122700Y160499D02* |
X155300D01* |
X122700Y159599D02* |
X155300D01* |
X122700Y158699D02* |
X155300D01* |
X122700Y157799D02* |
X155300D01* |
X122700Y156899D02* |
X155300D01* |
X122700Y155999D02* |
X155300D01* |
X122700Y155099D02* |
X155300D01* |
X122700Y154199D02* |
X155300D01* |
X122700Y153299D02* |
X155300D01* |
X122700Y152399D02* |
X155300D01* |
X122700Y151499D02* |
X155300D01* |
X122700Y150599D02* |
X155300D01* |
X152473Y236999D02* |
X154642D01* |
X141058Y218999D02* |
X151308D01* |
X141058Y218099D02* |
X151308D01* |
X141058Y217199D02* |
X151308D01* |
X141007Y216299D02* |
X151284D01* |
X141058Y219899D02* |
X150621D01* |
X141047Y220799D02* |
X149721D01* |
X122700Y236999D02* |
X149642D01* |
X147790Y215399D02* |
X149326D01* |
X122700Y168599D02* |
X149093D01* |
X140664Y221699D02* |
X148994D01* |
X122700Y222599D02* |
X148761D01* |
X122700Y227099D02* |
X148758D01* |
X122700Y226199D02* |
X148758D01* |
X122700Y225299D02* |
X148758D01* |
X122700Y224399D02* |
X148758D01* |
X122700Y223499D02* |
X148758D01* |
X122700Y227999D02* |
X148747D01* |
X122700Y169499D02* |
X148682D01* |
X122700Y171299D02* |
X148667D01* |
X122700Y170399D02* |
X148667D01* |
X122700Y236099D02* |
X148638D01* |
X122700Y228899D02* |
X148287D01* |
X122700Y235199D02* |
X148215D01* |
X122700Y229799D02* |
X148110D01* |
X122700Y234299D02* |
X148108D01* |
X122700Y233399D02* |
X148108D01* |
X122700Y232499D02* |
X148108D01* |
X122700Y231599D02* |
X148108D01* |
X122700Y230699D02* |
X148108D01* |
X122700Y172199D02* |
X147974D01* |
X122700Y173099D02* |
X147074D01* |
X122700Y173999D02* |
X146174D01* |
X122700Y174899D02* |
X145274D01* |
X122700Y175799D02* |
X144374D01* |
X140439Y215399D02* |
X144326D01* |
X139611Y214499D02* |
X143510D01* |
X122700Y176699D02* |
X143474D01* |
X140574Y213599D02* |
X143086D01* |
X122700Y177599D02* |
X142574D01* |
X122700Y178499D02* |
X141674D01* |
X122700Y179399D02* |
X140774D01* |
X122700Y180299D02* |
X139874D01* |
X122700Y181199D02* |
X138974D01* |
X122700Y182099D02* |
X138074D01* |
X122700Y182999D02* |
X137174D01* |
X122700Y183899D02* |
X136274D01* |
X122700Y184799D02* |
X135374D01* |
X122700Y185699D02* |
X134498D01* |
X122700Y186599D02* |
X134022D01* |
X122700Y198299D02* |
X133905D01* |
X122700Y197399D02* |
X133905D01* |
X122700Y196499D02* |
X133905D01* |
X122700Y195599D02* |
X133905D01* |
X122700Y194699D02* |
X133905D01* |
X122700Y193799D02* |
X133905D01* |
X122700Y192899D02* |
X133905D01* |
X122700Y191999D02* |
X133905D01* |
X122700Y191099D02* |
X133905D01* |
X122700Y190199D02* |
X133905D01* |
X122700Y189299D02* |
X133905D01* |
X122700Y188399D02* |
X133905D01* |
X122700Y187499D02* |
X133905D01* |
X122700Y199199D02* |
X133880D01* |
X122700Y214499D02* |
X133565D01* |
X122700Y207299D02* |
X133160D01* |
X122700Y206399D02* |
X133025D01* |
X122700Y200099D02* |
X132715D01* |
X122700Y215399D02* |
X132676D01* |
X122700Y213599D02* |
X132647D01* |
X122700Y221699D02* |
X132451D01* |
X122700Y208199D02* |
X132445D01* |
X122700Y205499D02* |
X132416D01* |
X122700Y200999D02* |
X132361D01* |
X122700Y212699D02* |
X132356D01* |
X122700Y211799D02* |
X132355D01* |
X122700Y210899D02* |
X132355D01* |
X122700Y209999D02* |
X132355D01* |
X122700Y209099D02* |
X132355D01* |
X122700Y204599D02* |
X132355D01* |
X122700Y203699D02* |
X132355D01* |
X122700Y202799D02* |
X132355D01* |
X122700Y201899D02* |
X132355D01* |
X122700Y216299D02* |
X132108D01* |
X122700Y220799D02* |
X132068D01* |
X122700Y219899D02* |
X132058D01* |
X122700Y218999D02* |
X132058D01* |
X122700Y218099D02* |
X132058D01* |
X122700Y217199D02* |
X132058D01* |
G54D40* |
X221002Y136510D02* |
Y135310D01* |
X202802Y136510D02* |
Y135310D01* |
X211902Y136510D02* |
Y135310D01* |
X178800Y188000D03* |
G54D43* |
X186884Y166138D02* |
Y170638D01* |
X173884Y166138D02* |
Y170638D01* |
X224689Y172049D02* |
Y167549D01* |
X237689Y172049D02* |
Y167549D01* |
G54D45* |
X173529Y134397D03* |
X163529D03* |
X173529Y144397D03* |
X163529D03* |
X173529Y154397D03* |
X163529D03* |
X251309Y187702D03* |
X261309D03* |
X251309Y177702D03* |
X261309D03* |
X251309Y167702D03* |
X261309D03* |
X220015Y201331D03* |
Y191331D03* |
X210020Y201331D03* |
Y191331D03* |
X152637Y188800D03* |
Y198800D03* |
X162637Y188800D03* |
Y198800D03* |
G54D46* |
X184280Y230140D02* |
Y227440D01* |
X195680Y230140D02* |
Y227440D01* |
G54D47* |
X146058Y234411D02* |
Y229911D01* |
X151058Y234411D02* |
Y229911D01* |
X156058Y234411D02* |
Y229911D01* |
X161058Y234411D02* |
Y229911D01* |
Y213011D02* |
Y208511D01* |
X156058Y213011D02* |
Y208511D01* |
X151058Y213011D02* |
Y208511D01* |
X146058Y213011D02* |
Y208511D01* |
G54D55* |
X191403Y269381D02* |
Y268593D01* |
X196403Y263475D02* |
Y262688D01* |
X201403Y263475D02* |
Y262688D01* |
X206403Y269381D02* |
Y268593D01* |
X211403Y263475D02* |
Y262688D01* |
X216403Y263475D02* |
Y262688D01* |
X221403Y269381D02* |
Y268593D01* |
G54D56* |
X232230Y259144D03* |
X181718Y263081D03* |
G54D57* |
X227076Y213427D02* |
Y215198D01* |
X217076Y213427D02* |
Y215198D01* |
X207076Y213427D02* |
Y215198D01* |
Y229962D02* |
Y231734D01* |
X217076Y229962D02* |
Y231734D01* |
X227076Y229962D02* |
Y231734D01* |
G54D58* |
X228789Y222580D02* |
X227824D01* |
X206328D02* |
X205364D01* |
G54D59* |
X190262Y156326D02* |
Y155933D01* |
Y136247D02* |
Y135854D01* |
X233542Y156326D02* |
Y155933D01* |
Y136247D02* |
Y135854D01* |
G74* |
X0Y0D02* |
M02* |
/Modules/Clock/CLKGEN01A/CAM_PROFI/BOARD.PHO |
---|
0,0 → 1,364 |
* |
* |
G04 PADS9.0.2 Build Number: 372616 generated Gerber (RS-274-X) file* |
G04 PC Version=2.1* |
* |
%IN "CLKGEN.pcb"*% |
* |
%MOIN*% |
* |
%FSLAX35Y35*% |
* |
* |
* |
* |
G04 PC Standard Apertures* |
* |
* |
G04 Thermal Relief Aperture macro.* |
%AMTER* |
1,1,$1,0,0* |
1,0,$1-$2,0,0* |
21,0,$3,$4,0,0,45* |
21,0,$3,$4,0,0,135* |
% |
* |
* |
G04 Annular Aperture macro.* |
%AMANN* |
1,1,$1,0,0* |
1,0,$2,0,0* |
% |
* |
* |
G04 Odd Aperture macro.* |
%AMODD* |
1,1,$1,0,0* |
1,0,$1-0.005,0,0* |
% |
* |
* |
G04 PC Custom Aperture Macros* |
* |
* |
* |
* |
* |
* |
G04 PC Aperture Table* |
* |
%ADD024C,0.001*% |
%ADD025C,0.01*% |
* |
* |
* |
* |
G04 PC Circuitry* |
G04 Layer Name CLKGEN.pcb - circuitry* |
%LPD*% |
* |
* |
G04 PC Custom Flashes* |
G04 Layer Name CLKGEN.pcb - flashes* |
%LPD*% |
* |
* |
G04 PC Circuitry* |
G04 Layer Name CLKGEN.pcb - circuitry* |
%LPD*% |
* |
G54D24* |
G01X121000Y279000D02* |
X121003D01* |
X279000D02* |
X279003D01* |
X279000Y121000D02* |
X279003D01* |
X279000Y279000D02* |
X279003D01* |
G54D25* |
X121000D02* |
X279000D01* |
Y121000* |
X121000* |
Y279000* |
Y301200D02* |
X182227D01* |
X121000D02* |
X131000Y303700D01* |
Y298700* |
X121000Y301200* |
X279000D02* |
X217773D01* |
X279000D02* |
X269000Y298700D01* |
Y303700* |
X279000Y301200* |
X121000Y284000D02* |
Y306200D01* |
X279000Y284000D02* |
Y306200D01* |
X185227Y302763D02* |
X185682Y303075D01* |
X186364Y304013* |
X186364D02* |
Y297450D01* |
X191364Y304013D02* |
X189091D01* |
X189091D02* |
X188864Y301200D01* |
X189091Y301513* |
X189091D02* |
X189773Y301825D01* |
X190455* |
X191136Y301513* |
X191136D02* |
X191591Y300888D01* |
X191591D02* |
X191818Y299950D01* |
X191591Y299325* |
X191364Y298388* |
X191364D02* |
X190909Y297763D01* |
X190909D02* |
X190227Y297450D01* |
X189545* |
X188864Y297763* |
X188864D02* |
X188636Y298075D01* |
X188409Y298700* |
X195000Y304013D02* |
X194318Y303700D01* |
X194091Y303075* |
Y302450* |
X194318Y301825* |
X194773Y301513* |
X194773D02* |
X195682Y301200D01* |
X196364Y300888* |
X196364D02* |
X196818Y300263D01* |
X196818D02* |
X197045Y299638D01* |
X197045D02* |
Y298700D01* |
X196818Y298075* |
X196591Y297763* |
X196591D02* |
X195909Y297450D01* |
X195000* |
X194318Y297763* |
X194318D02* |
X194091Y298075D01* |
X193864Y298700* |
Y299638* |
X193864D02* |
X194091Y300263D01* |
X194091D02* |
X194545Y300888D01* |
X194545D02* |
X195227Y301200D01* |
X196136Y301513* |
X196136D02* |
X196591Y301825D01* |
X196818Y302450* |
Y303075* |
X196591Y303700* |
X195909Y304013* |
X195909D02* |
X195000D01* |
X200455D02* |
X199773Y303700D01* |
X199318Y302763* |
X199318D02* |
X199091Y301200D01* |
Y300263* |
X199091D02* |
X199318Y298700D01* |
X199773Y297763* |
X199773D02* |
X200455Y297450D01* |
X200909* |
X201591Y297763* |
X201591D02* |
X202045Y298700D01* |
X202273Y300263* |
X202273D02* |
Y301200D01* |
X202045Y302763* |
X202045D02* |
X201591Y303700D01* |
X200909Y304013* |
X200909D02* |
X200455D01* |
X204318Y301825D02* |
Y297450D01* |
Y300575D02* |
X205000Y301513D01* |
X205000D02* |
X205455Y301825D01* |
X206136* |
X206591Y301513* |
X206591D02* |
X206818Y300575D01* |
Y297450* |
Y300575D02* |
X207500Y301513D01* |
X207500D02* |
X207955Y301825D01* |
X208636* |
X209091Y301513* |
X209091D02* |
X209318Y300575D01* |
Y297450* |
X211364Y304013D02* |
X211591Y303700D01* |
X211818Y304013* |
X211818D02* |
X211591Y304325D01* |
X211364Y304013* |
X211591Y301825D02* |
Y297450D01* |
X213864Y304013D02* |
Y297450D01* |
X306000Y121000D02* |
Y193250D01* |
Y121000D02* |
X303500Y131000D01* |
X308500* |
X306000Y121000* |
Y279000D02* |
Y206750D01* |
Y279000D02* |
X308500Y269000D01* |
X303500* |
X306000Y279000* |
X284000Y121000D02* |
X311000D01* |
X284000Y279000D02* |
X311000D01* |
X291227Y201563D02* |
X291682Y201875D01* |
X292364Y202813* |
X292364D02* |
Y196250D01* |
X297364Y202813D02* |
X295091D01* |
X295091D02* |
X294864Y200000D01* |
X295091Y200313* |
X295091D02* |
X295773Y200625D01* |
X296455* |
X297136Y200313* |
X297136D02* |
X297591Y199688D01* |
X297591D02* |
X297818Y198750D01* |
X297591Y198125* |
X297364Y197188* |
X297364D02* |
X296909Y196563D01* |
X296909D02* |
X296227Y196250D01* |
X295545* |
X294864Y196563* |
X294864D02* |
X294636Y196875D01* |
X294409Y197500* |
X301000Y202813D02* |
X300318Y202500D01* |
X300091Y201875* |
Y201250* |
X300318Y200625* |
X300773Y200313* |
X300773D02* |
X301682Y200000D01* |
X302364Y199688* |
X302364D02* |
X302818Y199063D01* |
X302818D02* |
X303045Y198438D01* |
X303045D02* |
Y197500D01* |
X302818Y196875* |
X302591Y196563* |
X302591D02* |
X301909Y196250D01* |
X301000* |
X300318Y196563* |
X300318D02* |
X300091Y196875D01* |
X299864Y197500* |
Y198438* |
X299864D02* |
X300091Y199063D01* |
X300091D02* |
X300545Y199688D01* |
X300545D02* |
X301227Y200000D01* |
X302136Y200313* |
X302136D02* |
X302591Y200625D01* |
X302818Y201250* |
Y201875* |
X302591Y202500* |
X301909Y202813* |
X301909D02* |
X301000D01* |
X306455D02* |
X305773Y202500D01* |
X305318Y201563* |
X305318D02* |
X305091Y200000D01* |
Y199063* |
X305091D02* |
X305318Y197500D01* |
X305773Y196563* |
X305773D02* |
X306455Y196250D01* |
X306909* |
X307591Y196563* |
X307591D02* |
X308045Y197500D01* |
X308273Y199063* |
X308273D02* |
Y200000D01* |
X308045Y201563* |
X308045D02* |
X307591Y202500D01* |
X306909Y202813* |
X306909D02* |
X306455D01* |
X310318Y200625D02* |
Y196250D01* |
Y199375D02* |
X311000Y200313D01* |
X311000D02* |
X311455Y200625D01* |
X312136* |
X312591Y200313* |
X312591D02* |
X312818Y199375D01* |
Y196250* |
Y199375D02* |
X313500Y200313D01* |
X313500D02* |
X313955Y200625D01* |
X314636* |
X315091Y200313* |
X315091D02* |
X315318Y199375D01* |
Y196250* |
X317364Y202813D02* |
X317591Y202500D01* |
X317818Y202813* |
X317818D02* |
X317591Y203125D01* |
X317364Y202813* |
X317591Y200625D02* |
Y196250D01* |
X319864Y202813D02* |
Y196250D01* |
X0Y0D02* |
M02* |
/Modules/Clock/CLKGEN01A/CAM_PROFI/DRILL.DRL |
---|
0,0 → 1,39 |
% |
T1C.02913F197S55 |
X01964Y026308 |
X02014Y026308 |
X02114Y026308 |
X02064Y026899 |
X01914Y026899 |
X02214Y026899 |
X02164Y026308 |
T2C.035F197S55 |
X016353Y01344 |
X016353Y01444 |
X016353Y01544 |
X015264Y01888 |
X016264Y01888 |
X015264Y01988 |
X016264Y01988 |
X021002Y020133 |
X021002Y019133 |
X017353Y01544 |
X017353Y01444 |
X017353Y01344 |
X025131Y01677 |
X026131Y01677 |
X025131Y01777 |
X026131Y01777 |
X026131Y01877 |
X025131Y01877 |
X022002Y019133 |
X022002Y020133 |
T3C.05315F107S55 |
X023223Y025914 |
X018172Y026308 |
T4C.12598F035S794 |
X014Y014 |
X014Y026 |
X026Y026 |
X026Y014 |
M30 |
/Modules/Clock/CLKGEN01A/CAM_PROFI/T1.PHO |
---|
0,0 → 1,1106 |
* |
* |
G04 PADS9.0.2 Build Number: 372616 generated Gerber (RS-274-X) file* |
G04 PC Version=2.1* |
* |
%IN "CLKGEN.pcb"*% |
* |
%MOIN*% |
* |
%FSLAX35Y35*% |
* |
* |
* |
* |
G04 PC Standard Apertures* |
* |
* |
G04 Thermal Relief Aperture macro.* |
%AMTER* |
1,1,$1,0,0* |
1,0,$1-$2,0,0* |
21,0,$3,$4,0,0,45* |
21,0,$3,$4,0,0,135* |
% |
* |
* |
G04 Annular Aperture macro.* |
%AMANN* |
1,1,$1,0,0* |
1,0,$2,0,0* |
% |
* |
* |
G04 Odd Aperture macro.* |
%AMODD* |
1,1,$1,0,0* |
1,0,$1-0.005,0,0* |
% |
* |
* |
G04 PC Custom Aperture Macros* |
* |
* |
* |
* |
* |
* |
G04 PC Aperture Table* |
* |
%ADD024C,0.001*% |
%ADD025C,0.01*% |
%ADD029C,0.005*% |
%ADD036C,0.008*% |
* |
* |
* |
* |
G04 PC Circuitry* |
G04 Layer Name CLKGEN.pcb - circuitry* |
%LPD*% |
* |
* |
G04 PC Custom Flashes* |
G04 Layer Name CLKGEN.pcb - flashes* |
%LPD*% |
* |
* |
G04 PC Circuitry* |
G04 Layer Name CLKGEN.pcb - circuitry* |
%LPD*% |
* |
G54D24* |
G54D25* |
G01X198400Y217500D02* |
X199127Y214000D01* |
X199855Y217500D02* |
X199127Y214000D01* |
X199855Y217500D02* |
X200582Y214000D01* |
X201309Y217500D02* |
X200582Y214000D01* |
X202945Y217500D02* |
X203673Y214000D01* |
X204400Y217500D02* |
X203673Y214000D01* |
X204400Y217500D02* |
X205127Y214000D01* |
X205855Y217500D02* |
X205127Y214000D01* |
X207491Y217500D02* |
X208218Y214000D01* |
X208945Y217500D02* |
X208218Y214000D01* |
X208945Y217500D02* |
X209673Y214000D01* |
X210400Y217500D02* |
X209673Y214000D01* |
X212218Y214500D02* |
X212036Y214250D01* |
X212218Y214000* |
X212400Y214250* |
X212218Y214500* |
X214036Y217500D02* |
Y214000D01* |
Y216500D02* |
X214582Y217250D01* |
X214945Y217500* |
X215491* |
X215855Y217250* |
X216036Y216500* |
Y214000* |
Y216500D02* |
X216582Y217250D01* |
X216945Y217500* |
X217491* |
X217855Y217250* |
X218036Y216500* |
Y214000* |
X219673Y219250D02* |
Y214000D01* |
X223491Y217500D02* |
Y214000D01* |
Y216750D02* |
X223127Y217250D01* |
X222764Y217500* |
X222218* |
X221855Y217250* |
X221491Y216750* |
X221309Y216000* |
Y215500* |
X221491Y214750* |
X221855Y214250* |
X222218Y214000* |
X222764* |
X223127Y214250* |
X223491Y214750* |
X225127Y219250D02* |
Y214000D01* |
Y216750D02* |
X225491Y217250D01* |
X225855Y217500* |
X226400* |
X226764Y217250* |
X227127Y216750* |
X227309Y216000* |
Y215500* |
X227127Y214750* |
X226764Y214250* |
X226400Y214000* |
X225855* |
X225491Y214250* |
X225127Y214750* |
X229127Y214500D02* |
X228945Y214250D01* |
X229127Y214000* |
X229309Y214250* |
X229127Y214500* |
X233127Y216750D02* |
X232764Y217250D01* |
X232400Y217500* |
X231855* |
X231491Y217250* |
X231127Y216750* |
X230945Y216000* |
Y215500* |
X231127Y214750* |
X231491Y214250* |
X231855Y214000* |
X232400* |
X232764Y214250* |
X233127Y214750* |
X236764Y217500D02* |
X234764Y214000D01* |
Y217500D02* |
X236764D01* |
X234764Y214000D02* |
X236764D01* |
X180350Y134000D02* |
X185600D01* |
X180350D02* |
Y135636D01* |
X180600Y136182* |
X180850Y136364* |
X181350Y136545* |
X182100* |
X182600Y136364* |
X182850Y136182* |
X183100Y135636* |
Y134000* |
X180350Y139273D02* |
X180600Y138909D01* |
X181100Y138545* |
X181600Y138364* |
X182350Y138182* |
X183600* |
X184350Y138364* |
X184850Y138545* |
X185350Y138909* |
X185600Y139273* |
Y140000* |
X185350Y140364* |
X184850Y140727* |
X184350Y140909* |
X183600Y141091* |
X182350* |
X181600Y140909* |
X181100Y140727* |
X180600Y140364* |
X180350Y140000* |
Y139273* |
Y142727D02* |
X185600Y143636D01* |
X180350Y144545D02* |
X185600Y143636D01* |
X180350Y144545D02* |
X185600Y145455D01* |
X180350Y146364D02* |
X185600Y145455D01* |
X180350Y148000D02* |
X185600D01* |
X180350D02* |
Y150364D01* |
X182850Y148000D02* |
Y149455D01* |
X185600Y148000D02* |
Y150364D01* |
X180350Y152000D02* |
X185600D01* |
X180350D02* |
Y153636D01* |
X180600Y154182* |
X180850Y154364* |
X181350Y154545* |
X181850* |
X182350Y154364* |
X182600Y154182* |
X182850Y153636* |
Y152000* |
Y153273D02* |
X185600Y154545D01* |
X237550Y168800D02* |
X242800Y170255D01* |
X237550Y171709D02* |
X242800Y170255D01* |
X240050Y175527D02* |
X239550Y175164D01* |
X239300Y174800* |
Y174255* |
X239550Y173891* |
X240050Y173527* |
X240800Y173345* |
X241300* |
X242050Y173527* |
X242550Y173891* |
X242800Y174255* |
Y174800* |
X242550Y175164* |
X242050Y175527* |
X239300Y178073D02* |
X239550Y177709D01* |
X240050Y177345* |
X240800Y177164* |
X241300* |
X242050Y177345* |
X242550Y177709* |
X242800Y178073* |
Y178618* |
X242550Y178982* |
X242050Y179345* |
X241300Y179527* |
X240800* |
X240050Y179345* |
X239550Y178982* |
X239300Y178618* |
Y178073* |
Y181164D02* |
X242800D01* |
X240800D02* |
X240050Y181345D01* |
X239550Y181709* |
X239300Y182073* |
Y182618* |
X240800Y184255D02* |
Y186436D01* |
X240300* |
X239800Y186255* |
X239550Y186073* |
X239300Y185709* |
Y185164* |
X239550Y184800* |
X240050Y184436* |
X240800Y184255* |
X241300* |
X242050Y184436* |
X242550Y184800* |
X242800Y185164* |
Y185709* |
X242550Y186073* |
X242050Y186436* |
X241950Y196764D02* |
Y198764D01* |
X243950Y197673* |
Y198218* |
X244200Y198582* |
X244450Y198764* |
X245200Y198945* |
X245700* |
X246450Y198764* |
X246950Y198400* |
X247200Y197855* |
Y197309* |
X246950Y196764* |
X246700Y196582* |
X246200Y196400* |
X246700Y200764D02* |
X246950Y200582D01* |
X247200Y200764* |
X246950Y200945* |
X246700Y200764* |
X241950Y202945D02* |
Y204945D01* |
X243950Y203855* |
Y204400* |
X244200Y204764* |
X244450Y204945* |
X245200Y205127* |
X245700* |
X246450Y204945* |
X246950Y204582* |
X247200Y204036* |
Y203491* |
X246950Y202945* |
X246700Y202764* |
X246200Y202582* |
X241950Y206764D02* |
X247200Y208218D01* |
X241950Y209673D02* |
X247200Y208218D01* |
X253600Y196182D02* |
X253350D01* |
X252850Y196364* |
X252600Y196545* |
X252350Y196909* |
Y197636* |
X252600Y198000* |
X252850Y198182* |
X253350Y198364* |
X253850* |
X254350Y198182* |
X255100Y197818* |
X257600Y196000* |
Y198545* |
X257100Y200364D02* |
X257350Y200182D01* |
X257600Y200364* |
X257350Y200545* |
X257100Y200364* |
X252350Y204545D02* |
Y202727D01* |
X254600Y202545* |
X254350Y202727* |
X254100Y203273* |
Y203818* |
X254350Y204364* |
X254850Y204727* |
X255600Y204909* |
X256100Y204727* |
X256850Y204545* |
X257350Y204182* |
X257600Y203636* |
Y203091* |
X257350Y202545* |
X257100Y202364* |
X256600Y202182* |
X252350Y206545D02* |
X257600Y208000D01* |
X252350Y209455D02* |
X257600Y208000D01* |
X263350Y196000D02* |
X263100Y196364D01* |
X262350Y196909* |
X267600* |
X267100Y198727D02* |
X267350Y198545D01* |
X267600Y198727* |
X267350Y198909* |
X267100Y198727* |
X262350Y201455D02* |
X262600Y200909D01* |
X263100Y200727* |
X263600* |
X264100Y200909* |
X264350Y201273* |
X264600Y202000* |
X264850Y202545* |
X265350Y202909* |
X265850Y203091* |
X266600* |
X267100Y202909* |
X267350Y202727* |
X267600Y202182* |
Y201455* |
X267350Y200909* |
X267100Y200727* |
X266600Y200545* |
X265850* |
X265350Y200727* |
X264850Y201091* |
X264600Y201636* |
X264350Y202364* |
X264100Y202727* |
X263600Y202909* |
X263100* |
X262600Y202727* |
X262350Y202182* |
Y201455* |
Y204727D02* |
X267600Y206182D01* |
X262350Y207636D02* |
X267600Y206182D01* |
X149500Y171745D02* |
X149000Y171382D01* |
X148750Y170836* |
Y170109* |
X149000Y169564* |
X149500Y169200* |
X150000* |
X150500Y169382* |
X150750Y169564* |
X151000Y169927* |
X151500Y171018* |
X151750Y171382* |
X152000Y171564* |
X152500Y171745* |
X153250* |
X153750Y171382* |
X154000Y170836* |
Y170109* |
X153750Y169564* |
X153250Y169200* |
X150000Y176109D02* |
X149500Y175927D01* |
X149000Y175564* |
X148750Y175200* |
Y174473* |
X149000Y174109* |
X149500Y173745* |
X150000Y173564* |
X150750Y173382* |
X152000* |
X152750Y173564* |
X153250Y173745* |
X153750Y174109* |
X154000Y174473* |
Y175200* |
X153750Y175564* |
X153250Y175927* |
X152750Y176109* |
X148750Y177745D02* |
X154000D01* |
Y179927* |
X159900Y170945D02* |
X159400Y170582D01* |
X159150Y170036* |
Y169309* |
X159400Y168764* |
X159900Y168400* |
X160400* |
X160900Y168582* |
X161150Y168764* |
X161400Y169127* |
X161900Y170218* |
X162150Y170582* |
X162400Y170764* |
X162900Y170945* |
X163650* |
X164150Y170582* |
X164400Y170036* |
Y169309* |
X164150Y168764* |
X163650Y168400* |
X159150Y172582D02* |
X164400D01* |
X159150D02* |
Y173855D01* |
X159400Y174400* |
X159900Y174764* |
X160400Y174945* |
X161150Y175127* |
X162400* |
X163150Y174945* |
X163650Y174764* |
X164150Y174400* |
X164400Y173855* |
Y172582* |
X159150Y178218D02* |
X164400Y176764D01* |
X159150Y178218D02* |
X164400Y179673D01* |
X162650Y177309D02* |
Y179127D01* |
X207150Y178291D02* |
X207400Y177927D01* |
X207900Y177564* |
X208400Y177382* |
X209150Y177200* |
X210400* |
X211150Y177382* |
X211650Y177564* |
X212150Y177927* |
X212400Y178291* |
Y179018* |
X212150Y179382* |
X211650Y179745* |
X211150Y179927* |
X210400Y180109* |
X209150* |
X208400Y179927* |
X207900Y179745* |
X207400Y179382* |
X207150Y179018* |
Y178291* |
Y181745D02* |
X212400D01* |
X207150D02* |
Y184109D01* |
X209650Y181745D02* |
Y183200D01* |
X212400Y181745D02* |
Y184109D01* |
X217150Y176800D02* |
X222400Y178255D01* |
X217150Y179709D02* |
X222400Y178255D01* |
X219650Y183527D02* |
X219150Y183164D01* |
X218900Y182800* |
Y182255* |
X219150Y181891* |
X219650Y181527* |
X220400Y181345* |
X220900* |
X221650Y181527* |
X222150Y181891* |
X222400Y182255* |
Y182800* |
X222150Y183164* |
X221650Y183527* |
X138727Y239600D02* |
X138545Y240100D01* |
X138182Y240600* |
X137818Y240850* |
X137091* |
X136727Y240600* |
X136364Y240100* |
X136182Y239600* |
X136000Y238850* |
Y237600* |
X136182Y236850* |
X136364Y236350* |
X136727Y235850* |
X137091Y235600* |
X137818* |
X138182Y235850* |
X138545Y236350* |
X138727Y236850* |
X140364Y240850D02* |
Y235600D01* |
X142545* |
X144182Y240850D02* |
Y235600D01* |
X146727Y240850D02* |
X144182Y237350D01* |
X145091Y238600D02* |
X146727Y235600D01* |
X151091Y239600D02* |
X150909Y240100D01* |
X150545Y240600* |
X150182Y240850* |
X149455* |
X149091Y240600* |
X148727Y240100* |
X148545Y239600* |
X148364Y238850* |
Y237600* |
X148545Y236850* |
X148727Y236350* |
X149091Y235850* |
X149455Y235600* |
X150182* |
X150545Y235850* |
X150909Y236350* |
X151091Y236850* |
Y237600* |
X150182D02* |
X151091D01* |
X152727Y240850D02* |
Y235600D01* |
Y240850D02* |
X155091D01* |
X152727Y238350D02* |
X154182D01* |
X152727Y235600D02* |
X155091D01* |
X156727Y240850D02* |
Y235600D01* |
Y240850D02* |
X159273Y235600D01* |
Y240850D02* |
Y235600D01* |
X162000Y240850D02* |
X161455Y240600D01* |
X161091Y239850* |
X160909Y238600* |
Y237850* |
X161091Y236600* |
X161455Y235850* |
X162000Y235600* |
X162364* |
X162909Y235850* |
X163273Y236600* |
X163455Y237850* |
Y238600* |
X163273Y239850* |
X162909Y240600* |
X162364Y240850* |
X162000* |
X165091Y239850D02* |
X165455Y240100D01* |
X166000Y240850* |
Y235600* |
X169091Y240850D02* |
X167636Y235600D01* |
X169091Y240850D02* |
X170545Y235600D01* |
X168182Y237350D02* |
X170000D01* |
X161200Y228450D02* |
Y223200D01* |
X163018Y226700D02* |
X161200Y224200D01* |
X161927Y225200D02* |
X163200Y223200D01* |
X167018Y226700D02* |
Y223200D01* |
Y225950D02* |
X166655Y226450D01* |
X166291Y226700* |
X165745* |
X165382Y226450* |
X165018Y225950* |
X164836Y225200* |
Y224700* |
X165018Y223950* |
X165382Y223450* |
X165745Y223200* |
X166291* |
X166655Y223450* |
X167018Y223950* |
X168655Y228450D02* |
Y223200D01* |
X170473Y226700D02* |
X168655Y224200D01* |
X169382Y225200D02* |
X170655Y223200D01* |
X172291Y228450D02* |
Y223200D01* |
X173927Y228450D02* |
X174109Y228200D01* |
X174291Y228450* |
X174109Y228700* |
X173927Y228450* |
X174109Y226700D02* |
Y223200D01* |
X175927Y228450D02* |
Y223200D01* |
X177745Y226700D02* |
X175927Y224200D01* |
X176655Y225200D02* |
X177927Y223200D01* |
X183927Y227200D02* |
Y227450D01* |
X184109Y227950* |
X184291Y228200* |
X184655Y228450* |
X185382* |
X185745Y228200* |
X185927Y227950* |
X186109Y227450* |
Y226950* |
X185927Y226450* |
X185564Y225700* |
X183745Y223200* |
X186291* |
X189018Y228450D02* |
X188473Y228200D01* |
X188109Y227450* |
X187927Y226200* |
Y225450* |
X188109Y224200* |
X188473Y223450* |
X189018Y223200* |
X189382* |
X189927Y223450* |
X190291Y224200* |
X190473Y225450* |
Y226200* |
X190291Y227450* |
X189927Y228200* |
X189382Y228450* |
X189018* |
X192109Y227450D02* |
X192473Y227700D01* |
X193018Y228450* |
Y223200* |
X195745Y228450D02* |
X195200Y228200D01* |
X194836Y227450* |
X194655Y226200* |
Y225450* |
X194836Y224200* |
X195200Y223450* |
X195745Y223200* |
X196109* |
X196655Y223450* |
X197018Y224200* |
X197200Y225450* |
Y226200* |
X197018Y227450* |
X196655Y228200* |
X196109Y228450* |
X195745* |
X165600Y253927D02* |
X165100Y253745D01* |
X164600Y253382* |
X164350Y253018* |
Y252291* |
X164600Y251927* |
X165100Y251564* |
X165600Y251382* |
X166350Y251200* |
X167600* |
X168350Y251382* |
X168850Y251564* |
X169350Y251927* |
X169600Y252291* |
Y253018* |
X169350Y253382* |
X168850Y253745* |
X168350Y253927* |
X164350Y255564D02* |
X169600D01* |
Y257745* |
X164350Y259382D02* |
X169600D01* |
X164350Y261927D02* |
X167850Y259382D01* |
X166600Y260291D02* |
X169600Y261927D01* |
X164350Y264655D02* |
X164600Y264291D01* |
X165100Y263927* |
X165600Y263745* |
X166350Y263564* |
X167600* |
X168350Y263745* |
X168850Y263927* |
X169350Y264291* |
X169600Y264655* |
Y265382* |
X169350Y265745* |
X168850Y266109* |
X168350Y266291* |
X167600Y266473* |
X166350* |
X165600Y266291* |
X165100Y266109* |
X164600Y265745* |
X164350Y265382* |
Y264655* |
Y268109D02* |
X168100D01* |
X168850Y268291* |
X169350Y268655* |
X169600Y269200* |
Y269564* |
X169350Y270109* |
X168850Y270473* |
X168100Y270655* |
X164350* |
Y273564D02* |
X169600D01* |
X164350Y272291D02* |
Y274836D01* |
X196950Y248400D02* |
X196700Y248764D01* |
X195950Y249309* |
X201200* |
X212800Y248182D02* |
X212550D01* |
X212050Y248364* |
X211800Y248545* |
X211550Y248909* |
Y249636* |
X211800Y250000* |
X212050Y250182* |
X212550Y250364* |
X213050* |
X213550Y250182* |
X214300Y249818* |
X216800Y248000* |
Y250545* |
X152100Y132000D02* |
X155600D01* |
X153100D02* |
X152350Y132545D01* |
X152100Y132909* |
Y133455* |
X152350Y133818* |
X153100Y134000* |
X155600* |
X153100D02* |
X152350Y134545D01* |
X152100Y134909* |
Y135455* |
X152350Y135818* |
X153100Y136000* |
X155600* |
X152100Y139818D02* |
X155600D01* |
X152850D02* |
X152350Y139455D01* |
X152100Y139091* |
Y138545* |
X152350Y138182* |
X152850Y137818* |
X153600Y137636* |
X154100* |
X154850Y137818* |
X155350Y138182* |
X155600Y138545* |
Y139091* |
X155350Y139455* |
X154850Y139818* |
X152100Y141455D02* |
X155600Y143455D01* |
X152100D02* |
X155600Y141455D01* |
X150350Y151636D02* |
Y149818D01* |
X152600Y149636* |
X152350Y149818* |
X152100Y150364* |
Y150909* |
X152350Y151455* |
X152850Y151818* |
X153600Y152000* |
X154100Y151818* |
X154850Y151636* |
X155350Y151273* |
X155600Y150727* |
Y150182* |
X155350Y149636* |
X155100Y149455* |
X154600Y149273* |
X150350Y153636D02* |
X155600Y155091D01* |
X150350Y156545D02* |
X155600Y155091D01* |
G54D29* |
X171123Y145192D02* |
X168123D01* |
X167560Y145328* |
X167373Y145465* |
X167185Y145737* |
Y146010* |
X167373Y146283* |
X167560Y146419* |
X168123Y146556* |
X168498* |
X170373Y143965D02* |
X170560Y143692D01* |
X171123Y143283* |
X167185* |
X210467Y254800D02* |
Y257300D01* |
X210580Y257769* |
X210694Y257925* |
X210921Y258081* |
X211148* |
X211376Y257925* |
X211489Y257769* |
X211603Y257300* |
Y256988* |
X209330Y255581D02* |
Y255425D01* |
X209217Y255113* |
X209103Y254956* |
X208876Y254800* |
X208421* |
X208194Y254956* |
X208080Y255113* |
X207967Y255425* |
Y255738* |
X208080Y256050* |
X208308Y256519* |
X209444Y258081* |
X207853* |
X253715Y176293D02* |
X256715D01* |
X257278Y176157* |
X257465Y176020* |
X257653Y175748* |
Y175475* |
X257465Y175202* |
X257278Y175066* |
X256715Y174929* |
X256340* |
X253715Y177793D02* |
Y179293D01* |
X255215Y178475* |
Y178884* |
X255403Y179157* |
X255590Y179293* |
X256153Y179429* |
X256528* |
X257090Y179293* |
X257465Y179020* |
X257653Y178611* |
Y178202* |
X257465Y177793* |
X257278Y177657* |
X256903Y177520* |
X218538Y198924D02* |
Y195924D01* |
X218402Y195362* |
X218265Y195174* |
X217993Y194987* |
X217720* |
X217447Y195174* |
X217311Y195362* |
X217174Y195924* |
Y196299* |
X221129Y198924D02* |
X219765Y196299D01* |
X221811* |
X221129Y198924D02* |
Y194987D01* |
X208543Y198924D02* |
Y195924D01* |
X208406Y195362* |
X208270Y195174* |
X207997Y194987* |
X207724* |
X207452Y195174* |
X207315Y195362* |
X207179Y195924* |
Y196299* |
X211543Y198924D02* |
X210179D01* |
X210043Y197237* |
X210179Y197424* |
X210588Y197612* |
X210997* |
X211406Y197424* |
X211679Y197049* |
X211815Y196487* |
X211679Y196112* |
X211543Y195549* |
X211270Y195174* |
X210861Y194987* |
X210452* |
X210043Y195174* |
X209906Y195362* |
X209770Y195737* |
X158978Y191206D02* |
Y194206D01* |
X159114Y194769* |
X159251Y194956* |
X159523Y195144* |
X159796* |
X160069Y194956* |
X160205Y194769* |
X160342Y194206* |
Y193831* |
X156114Y191769D02* |
X156251Y191394D01* |
X156660Y191206* |
X156932* |
X157342Y191394* |
X157614Y191956* |
X157751Y192894* |
Y193831* |
X157614Y194581* |
X157342Y194956* |
X156932Y195144* |
X156796* |
X156387Y194956* |
X156114Y194581* |
X155978Y194019* |
Y193831* |
X156114Y193269* |
X156387Y192894* |
X156796Y192706* |
X156932* |
X157342Y192894* |
X157614Y193269* |
X157751Y193831* |
X137432Y262594D02* |
Y258656D01* |
Y262594D02* |
X138523Y258656D01* |
X139614Y262594D02* |
X138523Y258656D01* |
X139614Y262594D02* |
Y258656D01* |
X140841Y261844D02* |
X141114Y262031D01* |
X141523Y262594* |
Y258656* |
X136818Y142594D02* |
Y138656D01* |
Y142594D02* |
X137909Y138656D01* |
X139000Y142594D02* |
X137909Y138656D01* |
X139000Y142594D02* |
Y138656D01* |
X140364Y141656D02* |
Y141844D01* |
X140500Y142219* |
X140636Y142406* |
X140909Y142594* |
X141455* |
X141727Y142406* |
X141864Y142219* |
X142000Y141844* |
Y141469* |
X141864Y141094* |
X141591Y140531* |
X140227Y138656* |
X142136* |
X256818Y142594D02* |
Y138656D01* |
Y142594D02* |
X257909Y138656D01* |
X259000Y142594D02* |
X257909Y138656D01* |
X259000Y142594D02* |
Y138656D01* |
X260500Y142594D02* |
X262000D01* |
X261182Y141094* |
X261591* |
X261864Y140906* |
X262000Y140719* |
X262136Y140156* |
Y139781* |
X262000Y139219* |
X261727Y138844* |
X261318Y138656* |
X260909* |
X260500Y138844* |
X260364Y139031* |
X260227Y139406* |
X256750Y262594D02* |
Y258656D01* |
Y262594D02* |
X257841Y258656D01* |
X258932Y262594D02* |
X257841Y258656D01* |
X258932Y262594D02* |
Y258656D01* |
X261523Y262594D02* |
X260159Y259969D01* |
X262205* |
X261523Y262594D02* |
Y258656D01* |
G54D36* |
X178529Y159397D02* |
Y129397D01* |
X158529* |
Y159397* |
X178529* |
X246309Y162702D02* |
Y192702D01* |
X266309* |
Y162702* |
X246309* |
X215015Y206331D02* |
X225015D01* |
Y186331* |
X215015* |
Y206331* |
X205020D02* |
X215020D01* |
Y186331* |
X205020* |
Y206331* |
X167637Y183800D02* |
X147637D01* |
Y203800* |
X167637* |
Y183800* |
X0Y0D02* |
M02* |
/Modules/Clock/CLKGEN01A/SCH/CLKGEN.DSN |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/Modules/Clock/CLKGEN01A/SCH/CLKGEN.asc |
---|
0,0 → 1,72 |
*PADS-PCB* |
*PART* |
C1 C-ELYT,10uF@ELYTB |
C2 C-ELYT,10uF@ELYTB |
C3 C,470nF@C0805 |
C4 C,470nF@C0805 |
C5 C,100nF@C0805 |
C6 C,100nF@C0805 |
D1 D,1N4007@DO41 |
D2 D,1N4007@DO41 |
J1 JUMP2X3,JUMP2X3@JUMP2X3 |
J2 SATA,SATA@SATA |
J3 JUMP2X3,JUMP2X3@JUMP2X3 |
J4 JUMP2X1,JUMP2X1@JUMP2X1 |
J5 JUMP2X1,JUMP2X1@JUMP2X1 |
J6 JUMP2X2,JUMP2X2@JUMP2X2 |
M1 PAD,HOLE_M3@HOLE_M3 |
M2 PAD,HOLE_M3@HOLE_M3 |
M3 PAD,HOLE_M3@HOLE_M3 |
M4 PAD,HOLE_M3@HOLE_M3 |
M5 FIDU,FIDU@FIDU |
M6 FIDU_PASTE,FIDU_PASTE@FIDU_PASTE |
R1 R,4k7@R0805 |
R10 R,195R@R0805 |
R11 R,195R@R0805 |
R2 R,4k7@R0805 |
R3 R,200k@R0805 |
R4 R,0R@R0805 |
R5 R,0R@R0805 |
R6 R,4k7@R0805 |
R7 R,4k7@R0805 |
R9 R,0R@R0805 |
U1 SOT223,LM1117MPX@SOT223 |
U2 Si570,Si570@Si5XX |
U3 SO8_150,GTL2002@SO8_150 |
*NET* |
*SIGNAL* GND |
J1.1 J1.2 J1.5 J1.6 J2.1 J2.4 J2.7 J3.1 |
J3.2 J3.5 J3.6 U1.1 C1.C C2.C D1.A U2.3 |
C5.1 D2.A U3.1 C6.1 M1.1 M2.1 M3.1 M4.1 |
R10.1 R11.1 |
*SIGNAL* N01155 |
J2.3 C4.1 U2.5 R11.2 |
*SIGNAL* N01159 |
J2.2 C3.1 U2.4 R10.2 |
*SIGNAL* N01181 |
J2.6 C3.2 |
*SIGNAL* N01192 |
J2.5 C4.2 |
*SIGNAL* N02020 |
U2.1 J4.1 J4.2 |
*SIGNAL* N02024 |
U2.2 J5.1 J5.2 |
*SIGNAL* N02853 |
U3.6 J6.1 J6.2 R4.1 R6.1 |
*SIGNAL* N02857 |
U3.5 J6.3 J6.4 R5.1 R7.1 |
*SIGNAL* N03045 |
U3.7 U3.8 R3.1 C6.2 |
*SIGNAL* N03387 |
R1.1 U3.3 R4.2 R9.1 |
*SIGNAL* N03720 |
U2.7 R2.1 U3.4 R5.2 |
*SIGNAL* N08058 |
U2.8 R9.2 |
*SIGNAL* VDD |
J3.3 J3.4 U1.3 U1.4 C2.A U2.6 C5.2 D2.C |
R1.2 R2.2 U3.2 |
*SIGNAL* VIN |
J1.3 J1.4 U1.2 C1.A D1.C R3.2 R6.2 R7.2 |
*END* |
/Modules/Clock/CLKGEN01A/SCH/CLKGEN.pdf |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |