| 1 | Up to [[Laser_PC_Board_Designs]] |
| 2 | |
| 3 | = Firmware for Rev 2 Laser/TEC system = |
| 4 | |
| 5 | == I2C Bus == |
| 6 | |
| 7 | Four-channel I2C DAC [http://cds.linear.com/docs/Datasheet/2635fb.pdf LTC2635] |
| 8 | Address as follows by crate slot: |
| 9 | |
| 10 | {{{ |
| 11 | Slot I2C Note |
| 12 | 000 0x20 Slot 0 - default |
| 13 | 001 0x24 Slot 1 |
| 14 | 010 0x44 Slot 2 |
| 15 | 011 0x60 Slot 3 |
| 16 | 100 0xa4 Slot 4 |
| 17 | 101 0xc0 Slot 5 |
| 18 | |
| 19 | }}} |
| 20 | I2C bus is common to all uC (and to backplane if R5, R6 on Laser/TEC board installed). |
| 21 | |
| 22 | === uC Pinout === |
| 23 | |
| 24 | uC on Laser/TEC is [http://www.atmel.com/Images/doc8272.pdf ATMEGA164A] |
| 25 | |
| 26 | ADC reference should be external (REFS1=REFS0=0) |
| 27 | |
| 28 | ||''''Pin''' || '''Func''' || '''Name''' || '''Note''' || |
| 29 | ||PA0/ADC0 || ADC || ISENSE || Current sense 0.5V = 1A (4.88mA/LSB) || |
| 30 | ||PA1/ADC1 || ADC || THERM_LASER || Laser temperature ADC input (512 @ 25 deg C) || |
| 31 | ||PA2/ADC2 || ADC || THERM_HOT || TEC hot side ADC input (512 at 25 deg C) || |
| 32 | ||PA3/ADC3 || ADC || FAN_STATUS || Pulse if fan running || |
| 33 | ||PA4/ADC4 || ADC || QTEMP || Current source transistor temperature ADC input (512 at 25 deg C) || |
| 34 | ||PA5/ADC5 || || n.c. || || |
| 35 | ||PA6/ADC6 || IN || TEMP_FAIL || Over-temperature (logic ''1' if temp outside window) (Note 1) || |
| 36 | ||PA7/ADC7 || IN || OVER_CURRENT || Over-current (logic ''1' if over current set by pot) || |
| 37 | |
| 38 | Note 1 - Window set by R105,R107,R108 (3 per channel). Default values give 2.5V +/- 0.5V. |
| 39 | ''''Resistors R105 etc must be changed to 30k''' |
| 40 | |
| 41 | ||''''Pin''' || '''Func''' || '''Name''' || '''Note''' || |
| 42 | ||PB0-PB1 || IN || CH_ADR0-1 || Channel address 0-3 || |
| 43 | ||PB2-PB4 || IN || SL_ADR0-2 || Slot address 0-7 || |
| 44 | ||PB5-PB7 || IN || not used || programming connector || |
| 45 | ||''''Pin''' || '''Func''' || '''Name''' || '''Note''' || |
| 46 | ||PC0-PC11 || I2C || I2C SCL/SDA || disable except on channel 0? || |
| 47 | ||PC2 || OUT || LED D1 || ''0' for on, uC status || |
| 48 | ||PC3 || OUT || LED D5 || ''1' for on, laser on || |
| 49 | ||PC4-PC7 || || n.c. || || |
| 50 | ||''''Pin''' || '''Func''' || '''Name''' || '''Note''' || |
| 51 | ||PD0/RXD0 || UART || RS-485 Rx || RS-485 receive data || |
| 52 | ||PD1/TXD0 || UART || RS-485 Tx || RS-485 transmit data || |
| 53 | ||PD2-PD3 || IN || FAULT0-1 || Fault input for TEC PWM (Note 2) || |
| 54 | ||PD4 || OUT || PWM- || TEC PWM output (Note 3) || |
| 55 | ||PD5 || OUT || PWM+ || TEC PWM output || |
| 56 | ||PD6 || OUT || DE || RS-485 driver enable || |
| 57 | ||PD7 || OUT || L_SHDN || Laser shutdown. Logic ''1' to disable laser || |
| 58 | |
| 59 | Note 2: PWM condtions: "00"-Overcurrent, "01"-Undervoltage, "10"-Overtemperature, "11"-Normal |
| 60 | |
| 61 | Note 3: Assuming TEC is wired with "+'' lead to J20 pin 1, PWM+ provides cooling with PWM-='0'. PWM- provides heating with PWM+='0' |
| 62 | |
| 63 | |