Menu

18F45k80 USART

Help
Mikam
2016-01-26
2016-01-26
  • Mikam

    Mikam - 2016-01-26

    Hi All
    using v95.2
    I am only seeing data on USART1. Help. code below. Thanks in advance.

    ;Chip Settings

    chip 18F45K80,8

    config OSC=INTIO2

    ;Defines (Constants)

    define USART_BAUD_RATE 9600

    define USART2_BAUD_RATE 9600

    define USART_TX_BLOCKING

    define USART2_TX_BLOCKING

    'INITUsart
    adcon1.VCFG0=1
    adcon1.VCFG1=1
    Wait 500 mS

    'usart1 RS232
    dir portc.6 out
    dir portc.7 in

    'usart2 RS232
    dir portd.6 out
    dir portd.7 in

    Main:
    Hsersend 100,1
    wait 250 mS
    Hsersend 100,2
    Wait 250 mS
    goto Main​

     
  • Anobium

    Anobium - 2016-01-26

    @Mike. Version of GCB compiler and the version of the IDE please?
    For this information select GCBasic in the IDE toolbar, the build will be an option in the drop down, select this drop down option to show the compiler version. We need something like.

    • 'GCBasic Compiler v0.95.002 build date' from IDE
    • 0.95 2015-12-27 from the IDE outout screen

    Anobium

     
  • Mikam

    Mikam - 2016-01-26

    Hi Anobium
    Compiler v0.95.002
    0.95 2015-12-27

    Thanks

     
  • Anobium

    Anobium - 2016-01-26

    @Mike update USART.H to the latest release. Then test again - if this does not work then Mike Otte may been to wade in. Download here. Please update your system with this file.

     
  • Mikam

    Mikam - 2016-01-26

    Copied latest USART.H to Lowlevel directory which replaced older version.
    Sorry, still not working.

     
  • Anobium

    Anobium - 2016-01-26

    @MikeOtte. Any chance you can have a look this?

     
  • mmotte

    mmotte - 2016-01-26

    Yes, I have duplicated the problem and It isn't working. I will find a solution.

    BR
    Mike

     
  • mmotte

    mmotte - 2016-01-26

    Original posting **I found the problem.
    Please change the the usart file in / Greatcowbasic/Include/lowlevel/usart.h to the attached file.

    I'll send Anobium a message.
    BR
    Mike**

    Edited Posting by Anobium.

    Please download the latest USART.H file here

     

    Last edit: Anobium 2016-01-27
  • Mikam

    Mikam - 2016-01-26

    Excellent, now working.
    Thanks for the excellent support.

     

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.