Project PRINT TCSP 6 Software Design Narrative Team 8 Vineeth Harikumar
Project Abstract Printer power management system Use the power indicator LED as a light sensor Control printer's power based on light levels Route incoming print jobs to local storage/printer
Block Diagram 100 ohms LED SD Card Power Relay 110VAC SPI-to-Ethernet Controller PIC32MX795F512H Microcontroller 4 5VDC 2 RPG 4 LCD Display 16 3 ? SM Power Supply (to all components) Ethernet 110VAC Ethernet
SPI MICRO SD SPI-to-Ethernet Controller UART Debugging ADC LED light sensing GPIO pins LCD Software Design Considerations
Hybrid design Interrupts o UART - Debugging o Timers - light sensing routines, timeouts o SPI-to-Ethernet controller Polling o Store incoming bytes to SD card o Transmit bytes from SD card o Check flags for updating LCD o Check flags for LED light sensing routines Software Design
initializeUART() readAndForwardPacketsOnSPI() sampleADCVoltage() configureInterrupts() while(1) writeIncomingPacketsToSDCard() updateLCD()controlPrinterMode() Reset initializeADC() initializeSPI() initializeSDCard()
Code Hierarchy main.c SPI.hADC.hLCD.hSDCARD.hTIMER.hUART.h initSPI() SPIinterrupts() initADC() sampleADC() initLCD() sendCommand() sendByte() initSDCard() ReadSector() WriteSector() configTimer() TIMER_ISR() initUART() UART_ISR() WriteString()
ADC Pins AN4 & AN5 External VREF+ & VREF- Manual scanning mode LCD 12 GPIO Pins 8 data pins for DB0-DB9 Register select, Read/Write mode, Clock Initializations
UART UART1 Receiver and Transmitter 8 bit data size 0 parity bits, 1 stop bit Data rate = 38400bps TIMER Timer Channel 1 10ms interrupts Initializations
SPI MicroSD card o 3 pins (SCK,SDO, SDI) o Read/Write transfer rate 10Mbps SPI-to-Ethernet controller o Implemented with two interrupt pins and SPI o Maximum data transfer rate of upto 10Mbps Initializations
Code Completion Status MICROCONTROLLER - PIC32MX795F512H FUNCTIONSUSEPROGRESS TMRControlling sleep/hibernate timeout settingsCompleted ADCADC voltage samplingCompleted Light Sensor Driver Use the printer LED as a light sensorIn Progress UARTTesting and debuggingCompleted SPIR/W data to SD card, SPI-to-ETH ControllerScheduled SDCard Driver Driver that can handle the data I/O to and from the SDCard Scheduled LCD DriverParallel data shift-out to LCDCompleted
Questions?