Announcement

Collapse
No announcement yet.

Issue with DEC modifier and 18F26K83

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Andy Wood
    replied
    There must be something in the text that is upsetting the forum formatting.... Let's try again....

    When using the DEC modifier with HSEROUT on this MCU I am having some issues. If I run the code below, the serial output is:

    See attached image

    If the HSEROUT line is changed to hserout ["Testbyte= ",testbyte,10,13] the serial output is:

    Testbyte= 2

    which is expected.

    Not sure what is going on.

    Code has been copied and pasted directly from MicroCode Studio Plus and some of the formatting has been lost (i.e. capitalization of directives). Compiler version is PBPX 3.1.1.4


    DEFINE OSC 64

    DEFINE HSER_RXREG PORTC
    DEFINE HSER_RXBIT 7
    DEFINE HSER_TXREG PORTC
    DEFINE HSER_TXBIT 6
    DEFINE HSER_BAUD 115200

    clear
    Testbyte var byte

    TRISA = %00000000 '
    TRISB = %00001000 '
    TRISC = %10000000 '

    testbyte = 50

    main:

    hserout ["Testbyte= ",testbyte,10,13]
    pause 200
    goto main

    Leave a comment:


  • Andy Wood
    replied
    My post keeps getting truncated... not sure what is going on..


    When using the DEC modifier with HSEROUT on this MCU I am having some issues. If I run the code below, the serial output is:

    Testbyte=

    Leave a comment:


  • Andy Wood
    replied
    I'll try again... something went wrong with the post formatting..

    Hi,

    When using the DEC modifier with HSEROUT on this MCU I am having some issues. If I run the code below, the serial output is (without the quotes):

    "Testbyte=

    Leave a comment:


  • Andy Wood
    started a topic Issue with DEC modifier and 18F26K83

    Issue with DEC modifier and 18F26K83

    Hi,

    When using the DEC modifier with HSEROUT on this MCU I am having some issues. If I run the code below, the serial output is:

    Testbyte=
Working...
X