1 of 9

Profiling Lab 9�with logic analyzer

EE319H

2 of 9

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).

3 of 9

Call graph

Simplex

4 of 9

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

5 of 9

PF2 toggle three times in Tx SysTick ISR

Time to execute ADC_In is 125us

PC5 toggles at 38 kHz

6 of 9

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

7 of 9

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?

8 of 9

PF1 toggle three times in Rx UART1 ISR

Time to execute UART1 ISR is 2.5us

Why does the UART ISR so fast?

9 of 9

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