Menu

lowest level for outputting a char to the serial port on ff-xc8.asm for avr

ronny suy
2024-11-01
2024-11-01
  • ronny suy

    ronny suy - 2024-11-01

    Hi ,
    I succesfully build and programmed FF5 on an atmega1284P.
    I've also build a terminal myself with dvi output and usb keyboard.
    Problem is that when the screeen scrolls it takes some time because the scrolling is graphics based , not char based. Therefore I used a 'busy' signal from the picodvi to the atmega1284 on pinb0. I want to test this pinb0 just before or just after the sending of a char. I tried it in the label TX0 , but that doesn't seems to work (tried it on both places where the uart is written to).
    Where exactly have I to put my code ?
    BTW : the code is tested on another avr board using assembler so I know it's working
    Hoping someone can help.
    Kind regards,
    Ronny

     
  • ronny suy

    ronny suy - 2024-11-01

    Found the solution myself !
    I used the EMIT label to add my busy signal check.
    I also had to use lds instead of in to read pinb .
    Ronny.

     
  • Mikael Nordman

    Mikael Nordman - 2024-11-01

    This where I would have put it.

    TX0_LOOP:
            rcall   PAUSE
                      PUT TEST AND LOOP to TX0_LOOP HERE
             sbrs    t0, 5        ; UDRE0, UDRE USART Data Register Empty
            rjmp    TX0_LOOP
            m_out   UDR0_, tosl
            m_drop
            ret
    
     
  • ronny suy

    ronny suy - 2024-11-01

    I will try it again , I originally used to do this , but discovered my fault with the lds instead of in instruction in the emit routine.

     
  • ronny suy

    ronny suy - 2024-11-01

    Hi Mikael
    Tried it in tx0_loop , and it works now :-)
    Thanks for your info.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.