1 / 8

Team 5 Software Design

Team 5 Software Design. Madalina Vintila David Wilkinson Michelle Zhang Zac Greenawalt. Flowchart. Pseudo Code for the Pen. Initialization; While true { If pb flag set { Clear pb flag 2 channel conversion; Store sample in memory location Set data ready flag }

Download Presentation

Team 5 Software Design

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Team 5 Software Design Madalina Vintila David Wilkinson Michelle Zhang Zac Greenawalt

  2. Flowchart

  3. Pseudo Code for the Pen Initialization; While true { If pb flag set { Clear pb flag 2 channel conversion; Store sample in memory location Set data ready flag } else { if prev_press flag set { transmit end of character } } If data ready flag set { clear data ready flag Take sample from memory & add to buffer for transmitter Take battery count add to transmitter buffer Transmit (when buffer full) } If CC > max value { add CC value to transmitter stack transmit } }

  4. Subroutines Timer interrupt service subroutine (120Hz) { If PB pressed { Set flag to do conversion set previous press flag } Else { clear previous press flag } } CC interrupt { Increment cc value++ } Transmit subroutine { Clear CC Transmit buffer data }

  5. Flowchart

  6. Pseudo Code for the Base Initialization; While true { If receiver flag { clear receiver flag read from SPI; parse data check for end of character info – set flag if present else { store ATD into buffer } increment battery status variable with CC received } If end of character flag set { clear flag attempt character match with buffer data if match, display on LCD else display error mark (?) clear data stack } }

  7. Subroutines CC interrupt { if discharging { Increment cc value++ } else { Decrement cc value -- } } Timer interrupt { update base & pen battery status on LCD } Transceiver interrupt { set receiver flag }

  8. Questions? Comments?

More Related