Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chip Config & Drivers – Required Drivers:

Similar presentations


Presentation on theme: "Chip Config & Drivers – Required Drivers:"— Presentation transcript:

1 Chip Config & Drivers – Required Drivers:
Software UART to send/receive packets to/from UHF/VHF radio. USART0 SPI Driver for SD Card – Driver that the FAT32 file system will use the read and write data to the SD Flash Card. (need to turn off when so it doesn’t listen to I2C) Flight Computer Comm. – Driver that will do communication between Flight Computer and Electrical Power System. (I2C) I2C Comm. between RTC and WDT on System Support Module – Driver that will send and Receive I2C packets to RTC and WDT. (need to enable) I2C Comm. between Flight Computer and UHF/VHF Radio – Driver will send/receive packets to/from UHF/VHF Radio via I2C. USART1 S-Band Radio Comm. – Driver that will send/receive packets to/from the S-Band Radio. (UART) Heat On – Driver will turn the Heater on for various reasons. Will use a GPIO (Does this driver need to worry about battery voltage?) Function (Input from System Support Module) – Use 3 GPIO. (Future communication scheme) Off Vcc (Input from System Support Module) – Use a GPIO. Antenna Deployment Signal – Driver that will deploy antenna, use 2 GPIO. Camera On – Driver that will power on the camera, use a GPIO. Analog Audio to UHF/VHF Radio – Driver will output analog signal to radio. (Up call in ISR at 8kHz)

2 Current Status Working Driver(s) Driver(s) in the pipeline SW UART I2C
Buffered receive and transmit FIFO buffers Driver(s) in the pipeline I2C Uart0 Uart1

3 SwUartTxDriver - Design
Tx Ring Buffer Tx FSM Diagram Key old new State output If no char in buffer Idle A Stop high Start Low St0 bit0 St7 bit7 If char found in buffer St6 bit6 St1 bit1 ASCII characters are removed from Tx ring buffer bit by bit. St5 bit5 St2 bit2 St4 bit4 St3 bit3

4 SwUartTxDriver - Functions
ubyte SwUartTxCheckBuff(void) Function used to get the status of the Tx FIFO ring buffer used void SwUartTxPutC(ubyte inchar) Function Used to insert characters into the Tx FIFO ring buffer If buffer is full function will spin until the ISR has taken a character out of the Tx FIFO ring buffer void SwUartTxPutS(ubyte *instr) Function used to put a character string into the Tx FIFO ring buffer Function makes multiple calls of SwUartTxPutC void IsrSwUartTxBitShift(void) Function to implement the Tx FSM within the Timer_A ISR to shift out the bit of each character Function will be called every 4800 baud half bit time within ISR

5 SwUartRxDriver - Design
Rx Ring Buffer Key Rx FSM Diagram old State output new While no input Idle A Stop high Start Low St0 bit0 St7 bit7 When ISR is made St6 bit6 St1 bit1 ASCII characters are inserted into the Rx ring buffer bit by bit. St5 bit5 St2 bit2 St4 bit4 St3 bit3

6 SwUartRxDriver - Functions
ubyte SwUartRxGetC(void) Function used to get a character out of the Rx FIFO ring buffer Function will return character if one is present and return NULL_UBYTE if the buffer is empty ubyte SwUartRxCheckBuff(void) Function used to get the status of the Rx FIFO ring buffer used ubyte SwUartRxPutC(ubyte inchar) Function used by ISR to put characters in the Rx FIFO buffer Function will return one of the following values: SWUART_RXBUFF_ERRORFULL, SWUART_RXBUFF_NOERROR void SwUartRxStart(void) Function used by Port2 ISR to start Rx FSM void IsrSwUartRxBitTake(void) Function implements FSM to shift in bits to receive a single character and put character into buffer Function will be called every half bit time at 4800 baud within ISR

7 TESTING Development board was hooked up to a Terminal Software, SW UART was made to echo what was sent to it. Also, multiple characters were sent and the SW UART echoed back the entire packet after \r. Packet Rx/Tx has been tested using SW UART without any problem with the driver.

8 Hardware Map Timer A : TMRA3
19200 Hz interrupts (4800 baud generation at 4x for signal pseudo-sync) Software UART Receive 1200 Hz interrupts (1200 baud generation for signal pseudo-sync) Software UART Transmit Timer B : TMRB7 8000 Hz interrupts Analog Audio 100 Hz interrupts OS Tick Sensor Acquisition* Analog to Digital Converter : ADC12 Analog audio in 8 bit samples Digital to Analog Converter : DAC12 Analog audio out Receiver/Transmitter One : USART1 UART MHX [ | | 9600 | 1200 ] Port Interrupts Software UART Receive Sync DTMF Valid Signal* Supervisor Serial Interface (Currently Undefined)* Receiver/Transmitter Zero : USART0 UART Camera at [ | | 9600 ] baud (others available) SPI SD Flash Mass Storage (Unknown max flash speed. Test at uC max and backoff as necessary.) I2C Speed 400khz by spec. Drive at [ 200k | 100k | 50k ]. Devices Camera Temperature Radio TX/RX/AMP Binary Power Control Radio TX Current Radio RX Current Power System

9 FUTURE I2C, Uart0 and Uart1 drivers are in progress (80%) done.
Buffers have been written for USART1 and USART0 in UART mode. SPI drivers under research and conversation. Looking at file system calls to drivers so they can be integrated.


Download ppt "Chip Config & Drivers – Required Drivers:"

Similar presentations


Ads by Google