Download AppNote 405 - MERA

Transcript
AppNote 405
5
5.1
Software
Reader flow chart Start of Reader and UART communication
Start Reader
Start Receive
UARt INT
Init µC
send Reader
status via Uart
INT occured
enable Receive
Uart INT
Byte receive
OK
No
clr status
"new message"
1
Yes
set status
"NEW
MESSAGE"
1
Yes
if ( 1 )
STX
received
state machine
status
NEW
MESSAGE
No
No
1
No
1
Yes
fill uart buffer
ETX received
Yes
CRC OK
No
clr status
"new message"
1
Yes
Disable
receive Interrupt
Task 1
Analyse
command
clr status
"new message"
1
end of Interrupt
Figure 2: Reader flow chart Start of Reader and UART communication
Copyright  2001, EM Microelectronic-Marin SA
8
www.emmicroelectronic.com