Menu

90S series

2021-03-10
2021-03-21
  • Bertrand BAROTH

    Bertrand BAROTH - 2021-03-10

    I installed RC42 and I saw that 90S8515 is still not supported with the hardware UART : in the ASM code there are references to UBRRH and UBRRL (which don't exist, there is UBRR instead), and the value used for 9600 Bd is not correct (51 instead of 25) ; can we hope that this issue will be corrected once, or is the 90S series too old to be used by most programmers ?
    Thanks for any answer ...

     
    • Anobium

      Anobium - 2021-03-10

      Remind me. Did we fix this? and, I have not merged the source?

       
  • Bertrand BAROTH

    Bertrand BAROTH - 2021-03-18

    I installed newest version of RC42 ... and saw that 90S mode UART is still not supported ; I think this would need among others a special version of USART.h and an indicator in the definition files to include the appropriate version of USART.h ; can we expect that this will be done ... in a future, or are there to few users of 90S series ? I am planning a new PCB and the version would be different for 90S or MEGA (external clock, extra BOD circuit to avoid transient moves of turnouts during power down). Or, I think that You should remove all definitions files for the old 90S, remember how long it needed to find the issue !

     
    • Anobium

      Anobium - 2021-03-18

      Point me at the correct datasheet. We may just need to tweak a few registers.

       
  • William Roth

    William Roth - 2021-03-21

    I have added support for the 90S series in usart.h. The updated library has been sent to Anobium for initial review. However, it will need to be tested on silicon before being provided for release.

    Need to make sure that:
    1) It works on 90S series AVR
    2) Did not break anything else

    I do not have any AVR 90S series chips to test and am only going by what looks to be correct in the GCB generated ASM file.

    With the Chip MHz set to 4 and the Baud Rate Set to 9600 UBRR is now set to 25. This matches the Chart in the Datasheet on Page 8. All other combination I have tested correctly match the chart in the Datasheet.

     
  • Anobium

    Anobium - 2021-03-21

    @alberich

    Attached is the new USART.H Please test asap. Bill has spent many fun hours adding the new capability for your chips.

    :-)

     
  • William Roth

    William Roth - 2021-03-21

    With this series of chips, certain Chip Speed/ Baud rate combinations will have significant baud rate errors.

    So be sure to refer to the chart in the Datasheet on Page 58 and select Chip Speed and Baud Rate combinations that have a baud rate error less than about 2 percent or so.

    9600 Baud at either 4 MHz or 8Mhz should work great.

     
  • Bertrand BAROTH

    Bertrand BAROTH - 2021-03-21

    Thanks for Your efforts ... I tested with 9600 Bd on my STK200 (UBRR = 25), it works fine ; I generated the ASM code for 6MHz (UBRR = 38) and the "very appreciated" 4.915200 MHz =9600 x 512 (UBRR = 31) : Looking at ASM File the value was correct in each case ... So I think I will simply replace the usart.h file, I think it is unnecessary to build an extra installer, the nerds like me who are still using 90S series will be rather rare ! Include it simply into the NEXT major version.

    About the clock : I thought that Megas would work correctly with USART and integrated clock source. So I tested with two samples of Mega8515 and the internal oscillator at 4MHz : in one case it worked, I got an "approximatively correct" baud rate, but with the other one it didn't, it worked only with the external Xtal. So if one doesn't wanna use a frequency counter to find the correct value of OSCCAL, it is easier to use an external clock all the way, even with the Mega's !

     

    Last edit: Bertrand BAROTH 2021-03-21
  • Anobium

    Anobium - 2021-03-21

    This is NOT a special installer for the fix.

     

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.