Connect with us

Binary Output in Tera Term

Discussion in 'Microcontrollers, Programming and IoT' started by Horn, Jun 6, 2012.

Scroll to continue with content
  1. Horn


    Jun 4, 2012
    I am using MPLAB to program a PIC16F1937 in C language. I have a font matrix of hexadecimal values (stored as const unsigned char) that when each row of hexadecimal values are represented in binary form an eight by ten display where the ones trace a shape of a letter like 'A' from 0x30, 0x78, 0xCC, 0xCC, 0xFC, 0xCC, 0xCC, 0x00, 0x00, 0x00. I want to be able to take these hexadecimal numbers and output them onto tera term as a binary string. I started small and sent over 0x59 and got lots of Y's (since 59 is the ASCII code for Y). Can Tera Term have its ASCII turned off to display binary? Also how do I introduce the stop sequence ('\o') and new line ('\n')?
    Last edited: Jun 6, 2012
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    Jan 21, 2010
    your best bet is to take each byte as two nybles. Then each nyble corresponds to a single hex digit. Convert the value to its character representation. then output it.

    \n and other characters can be looked up on any handy ASCII chart.
  3. Horn


    Jun 4, 2012
    Ok I read up on the nybles now I have a question on how to separate the hex digits to read each one independently? Because now it is inside a matrix defined as a const unsignd char. My variable is set up like this; font[(this represents a number to be displayed on the screen)][(this is each row of the display)].

    I also have a problem with Tera Term reading a simple string of letters.
    char A="0110";

    this outputs a lot of sqrt symbols.
    Last edited: Jun 6, 2012
  4. CocaCola


    Apr 7, 2012
    From the official support site they suggest putting Tera Term in debug mode to see the raw data...
  5. Horn


    Jun 4, 2012
    I have read that and sadly I am running on VMWare and I am unsure of how to enter debug mode because the ctrl+esc does not work for me.
  6. Harald Kapp

    Harald Kapp Moderator Moderator

    Nov 17, 2011
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day