avr: improved protocol timing for COM2.

- increased waiting time after lowering ATTN line
- lengthten stop bit for cleaner frames (now recognized by PulseView)
- count "NOTFORME" conditions
- introduce definition COM_HALFBIT_LENGTH (I dont' trust value calculations
  in avrasm)
This commit is contained in:
Martin Preuss
2024-09-29 14:59:19 +02:00
parent b93ead5e5f
commit 5767c1307d
9 changed files with 88 additions and 30 deletions

View File

@@ -77,7 +77,6 @@ COM2_SendPacketWithAttn:
push r15
in r15, SREG
cli
; rcall com2WaitForOneBitLength ; wait for one bit duration (R22)
; check for ATTN line: busy?
cbi COM_PORT_ATTN, COM_PINNUM_ATTN ; disable pullup on ATTN
cbi COM_DDR_ATTN, COM_PINNUM_ATTN ; set ATTN as input
@@ -87,7 +86,8 @@ COM2_SendPacketWithAttn:
cbi COM_PORT_ATTN, COM_PINNUM_ATTN ; set ATTN low
sbi COM_DDR_ATTN, COM_PINNUM_ATTN ; set ATTN as output
rcall com2WaitForOneBitLength ; wait for one bit duration (R22)
rcall com2WaitForOneBitLength ; wait for one bit duration (R22)
rcall com2WaitForOneBitLength ; wait for another bit duration (R22)
adiw xh:xl, COM2_MSG_OFFS_MSGLEN
ld r16, X