Profiling Lab 9�with logic analyzer
EE319H
Transmitter Receiver
16 pulses per bit time
38kHz IR pulses
38kHz is 26.3 us period
16*26.3us=421.05us bit time
Baud rate = 2375 bps
Simplex
You can power the IR LED with 3.3V (giving 12 mA) or 5V (giving 20 mA).
Call graph
Simplex
PF2 triple toggled in SysTick ISR
PC5 38kHz modulated to IR LED
PC4 received UART signal
PF1 triple toggled in UART ISR
PF3 toggled in main
With a two-channel scope, you can look at these 2 at a time
Simplex
PF2 toggle three times in Tx SysTick ISR
Time to execute ADC_In is 125us
PC5 toggles at 38 kHz
First frame is STX = 0x02, bit time=421us
Time to execute send a frame is 4.21ms
start, bit0, bit 1, bit 2, bit 3, bit 4, bit 5, bit 6, bit 7, stop
16*26.3us=421.05us bit time
Baud rate = 2375 bps
PF2 toggle three times in Tx SysTick ISR
Time to send a message is 34ms
8*10*421.05us =34ms
Why does the SysTick ISR take slow long?
PF1 toggle three times in Rx UART1 ISR
Time to execute UART1 ISR is 2.5us
Why does the UART ISR so fast?
PF3 toggled in Rx main on receive message
It takes about 35ms from ADC sample to main program getting the message
Baud rate = 2375 bps
Max BW = 237.5 bytes/sec
Actual BW = 12 bit/0.1s = 120bps�Latency = 35ms