Version 11 (modified by 7 years ago) (diff) | ,
---|
This board contains an Atmel ATMega88PA-AU microcontroller. This pin assignments are given in the table below (taken from the schematic)
Pin | Name | In/Out | Signal | Function |
12 | PB0 | Out | TDC_EN_in | Configuration of TDC |
13 | PB1 | Out | TCC_EN_out | Configuration of TDC |
14 | PB2 | Out | TDC_RST | Configuration of TDC |
19 | ADC6 | Analog In | M1P5A | Measure 1.5V analog voltage |
22 | ADC7 | Analog In | M1P5D | Measure 1.5V digital voltage |
23 | PC0 | In | TDC_DOUT | Configuration of TDC |
24 | PC1 | Out | TDC_DIN | Configuration of TDC |
25 | PC2 | Out | TDC_CLK | Configuration of TDC |
26 | PC3 | Out | BLINK | Green LED on board |
30 | PD0/RxD | In | RxD | Serial receive data |
31 | PD1/TxD | Out | TxD | Serial transmit data |
32 | PD2 | In | ASD_DIN | Configuration of ASDs |
1 | PD3 | Out | ASD_DOUT | Configuration of ASDs |
2 | PD4 | Out | ASD_SLOAD | Configuration of ASDs |
9 | PD5 | Out | ASD_SCLK | Configuration of ASDs |
10 | PD6 | Out | ASD_SDOWN | Configuration of ASDs |
Firmware Development Plan
On Arduino
- Get new command parser (Eric/Val? code) and get it to run
- Read muon-2002-003.pdf pages 28 and 29
- Write code to read and write to the ASD serial interface using some Arduino pins
- Run the code, use an oscilloscope to verify the waveforms look correct.
- Read MDT_TDC_config_note.docx on the TDC configuration interface.
- Implement code to interact with TDC, use oscilloscope to veryify waveforms look correct.
- Implement VOLT, HELP etc
On the real hardware (next week)
- Modify Makefile for ATMega88 and set fuses (get help!)
- Change the pin assignments to work on real hardware (see schematic)
- Run the code and test it.
Firmware Specification
Command Format
<command> [<argument>...]
Where <command> is a word beginning with a letter (upper/lower case are equivalent) and <argument> are numbers or text strings separated by whitespace.
Numeric arguments are assumed decimal unless they have a prefix "0x" in which case they are hexadecimal.
LED command
LED ON|OFF|BLINK
-- turn LED on board on or off or blink at 1Hz
ASD command
The mezzanine board contains three ASD chips, each of which has 52 bits of programming information, detailed in this document: ASD00A_Prog.PDF.
ASD R
-- Read ASD configuration and display in hex (3 groups of 13 hex digits with spaces between)
ASD W <string1> <string2> <string3>
-- Write ASD configuration from 3 hex strings (each must be 13 digits long)
TDC command
TDC R
-- Read TDC configuration and display (14 registers of four hex digits each)
TDC W <reg> <value>
-- set TDC register <reg> to value <value>
VOLT command
VOLT
-- Read and display two 1.5V power supply voltages from ADC inputs
HELP command
HELP
-- print short list of valid commands