Chameleon-PIC Nurve Networks, Chameleon-PIC Datasheet - Page 145

MCU, MPU & DSP Development Tools PIC24 & PROPELLER DEV SYSTEM (SBC)

Chameleon-PIC

Manufacturer Part Number
Chameleon-PIC
Description
MCU, MPU & DSP Development Tools PIC24 & PROPELLER DEV SYSTEM (SBC)
Manufacturer
Nurve Networks
Datasheet

Specifications of Chameleon-PIC

Processor To Be Evaluated
PIC24
Data Bus Width
16 bit
Interface Type
USB, VGA, PS/2, I2C, ISP, SPI
Operating Supply Voltage
3.3 V, 5 V
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
reception hardware is taken care of for you and all you have to do is use these two functions (and pay attention to their
return values)!
So the idea of our UART module is that it loads up the ISRs for communication, set the USART hardware up (speed, bits
per character, parity, etc.) and then you communicate via a collection of functions. Now, although we can use the put and
get class functions, we have developed a number of other functions that help print strings, numbers, as well as directly
access the USART transmit buffer, so you can mix and match you serial library use as you wish or write you own.
18.2 Terminal Emulation (VT100 Commands)
The last subject I wanted to broach before moving onto the actual API is the topic of terminal emulation. Back in the olden
days before desktop computers actually fit underneath a desktop, users would access a large mainframe computer via a
terminal. The terminal consisted of little more than a screen, keyboard, and a tiny amount of processing with no local
storage. Figure 18.2 shows an actual Digital Equipment Corporation (DEC) VT100 terminal.
Characters where transmitted between the end user terminal to the mainframe over a serial line. Most of the data that was
sent back and forth was ASCII formatted character data. However, a problem arises with using ASCII as the transfer
medium because ASCII characters are contained in a single byte that only represent 256 different possibilities. Contained
within the ASCII character set is the alphabet, numbers, and some simple control codes like backspace, bell, carriage
return, etc. In order to transmit more advanced commands, terminals and their mainframes needed more options to issue
commands like:
Thus, standards committees and companies implemented command codes that allowed the use of multiple bytes for
describing a single command. One of these standards that became incredibly popular was created by the Digital
Equipment Corporation called the VT100 (based on the
programs that you find today support a majority of the command codes, also called escape codes, for the VT100 or its
successors like the VT101, VT102, VT200, and VT220. We are going to add some simple VT100 commands to our UART
API driver so we have more flexibility with our serial displays. Before we discuss what has been implement let’s talk about
how you create a VT100 command code.
The first thing a user needs to send over a serial line is an escape sequence so the terminal or terminal emulator knows
that more bytes are going to follow that make up this command. With the VT100 the escape code is, surprise, the ASCII
“escape” character <ESC> or hex 0x1B. After the escape character is sent, any number of bytes may follow afterwards
describing the entire code. There are many different escape codes and what is worse is that they are not very well
documented. Fortunately, the codes that we will use most often seem to work among most terminal emulators. An
example VT100 command to clear the terminal screen is:
Cursor position control.
Bold, blinking, and reverse text.
Screen Scrolling.
Erasing Screen or portions thereof.
Terminal reset commands.
<ESC>[2J
Figure 18.2 – DEC VT100 Terminal.
ANSI
X3.64 standard). Because of its popularity, many serial
© 2009 NURVE NETWORKS LLC “Exploring the Chameleon PIC 16-Bit”
145

Related parts for Chameleon-PIC