Presentation is loading. Please wait.

Presentation is loading. Please wait.

Madalina Vintila David Wilkinson Michelle Zhang Zac Greenawalt

Similar presentations


Presentation on theme: "Madalina Vintila David Wilkinson Michelle Zhang Zac Greenawalt"— Presentation transcript:

1 Madalina Vintila David Wilkinson Michelle Zhang Zac Greenawalt
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?


Download ppt "Madalina Vintila David Wilkinson Michelle Zhang Zac Greenawalt"

Similar presentations


Ads by Google