icon-mpu1

 

TuxMicro Devices

 

PICLink RS232/RS485 and USB Serial to HOST MCU



The PICLinkRSxxx controller module affords any micro-controller enthusiast an easy to use mini micro-controller which supports Analog-to-Digital conversion, I2C and RS232/RS485 as well as compatible USB to UART devices. Our Embedded USB to RS232 UART variant replaces the common 3 pin serial port  with an on board Micro USB connector and controller which supports RS232. This embedded micro-controller is ICSP (in circuit serial) programmable and provides separate PORTA, PORTB, RS232 Serial, I/O ports as well as an integrated ICSP port which is required to implement in circuit programming and debugging. On board host RS232 USART may be used to interface with a PC or a serial communications device like our 2.4 GHz Wi-Fi or 915MHz wireless radio modules.     

 

 icon-ic-les

LES 1.2 Firmware



LES-1.2 (version 1.2 ADC) is a miniaturized embedded framework written in C currently for PIC micro-controllers, which supports basic input/output, memory, Analog-to-Digital conversion and RS232 asynchronous communications in 16-Bit EUSART mode.  Because of its small footprint the entire system can fit into 1.7K (1664 Bytes) of flash program memory space. In addition, LES greatly simplifies bit level control of IO ports through macros like BIT_SET, BIT_CLEAR, BIT_IS_SET and BIT_COMP.  Port register control is achieved through PORTx macros and by employing structs and unions, which affords the ability to support bit level register and IO port control in firmware.  



Features    

  • Supply Voltage - 9 to 5.5 VDC H1-2 or 5.0 VDC H3-8
  • Supply Current - 10 mA typ
  • IO Pins support +3V and 5.0V logic devices 
  • ICSP (In-Circuit Serial Programmable)
    Supports Microchip device debugging via H1
  • 20 MHz Crystal controlled SBC
  • 11 bi-directional configurable I/O Pins
  • 5 channel Analog/Digital Conversion (PORTA H3)
  • 3 channel Analog/Digital Conversion (PORTB H4)
  • Dedicated Serial EUSART Port (SERIAL H2)
  • RS232/RS485 Baud rate generator supports 1200 to 115200
  • I2C Master/Slave or SPI peripheral port
  • 256 Bytes EEPROM
  • 256 Bytes SRAM
  • 4 K Flash program memory words (1.7K required by LES version 1.2)
  • LES firmware version 1.2 (ADC)



Module Dimensions

 55 mm L x 45 mm W x 6mm H (2.1in x 1.7 in x 0.23 in)

 

H1 Port 5 Pin ICSP


H1-1

Vpp (programming voltage 13.2vdc max)

H1-2

Vdd 9-5.5vdc (when programming use external power source >6vdc)

H1-3

GND

H1-4

PGD – ICSPDAT

H1-5

PGC – ICSPCLK


H1-4 .100 header (2.5mm) allows the module to be plugged into a solderless breadboard.

Header H1 ICSP compatible with PICKit2 or USBPIC and other PIC-ICSP compatible 

programmer/debuggers.   


H2 Port 3 Pin RS232/RS485 

 

H2-1

GND (from serial host device)

H2-2

Tx (picLink transmit output to serial host receive pin)  or RS485 D+

H2-3

Rx (picLink receive from serial host transmit pin) or RS485 D-


NOTE:


RS485 Compatible module converts H2 Port to provide deferential RS485 Standard levels 

RS232 Compatible module converts H2 Port to provide RS232 Standard logic voltage levels

USB to Serial UART Embedded module replaces H2 port with on board Micro USB connector

Serial module supports simple serial asynchronous communications via common USB to UART Bridge devices

When Ordering please indicate which H2 Serial Port configuration you require.    

 


H3 Port 8 Pin PORTA (5 channel ADC)

 

H3-1

RA2/AN2/INT  TTL IO or ADC Channel 2 (default) or External INT

H3-2

RC0/AN4 TTL IO  or ADC Channel 4 (default) or Comparator C2IN+

H3-3

RC1/AN5 TTL IO or ADC Channel 5 (default) or Comparator C2IN1-

H3-4

RC2/AN6/CMP TTL IO or ADC Channel 6 (default) or Comparator C2IN2-

H3-5

RB4/AN10/SDA  TTL IO or ADC Channel 10 (default)  or I2C-SDA or SPI-SDI

H3-6

RB6/SCL TTL IO (default) or I2C-SCL or SPI-SCK

H3-7

GND

H3-8

5.0 VDC @ 500ma (when powered from H1-2 via external power source) or regulated 5VDC from serial host device.


H4 Port 5 Pin PORTB (3 Channel ADC & PWM)

 

H4-1

RC5/CCP1  TTL IO (default) LED Indicator or PWM/CCP1 Output

H4-2

RC4/C2OUT TTL IO (default) or Comparator Output (C2OUT)

H4-3

RC3/AN7 TTL IO or ADC Channel 7 (default) or Comparator C2IN3-

H4-4

RC6/AN8 TTL IO or ADC Channel 8 (default) or SPI /SS

H4-5

RC7/AN9 TTL IO or ADC Channel 9 (default) or SPI SDO



I2C and SPI 

By default I2C-SDA line is provided by (H3-5) and I2C-SCL (H3-6). In order to use I2C mode the peripheral must be configured in firmware. Using I2C firmware it is possible to implement the I2C peripheral. We will be glad to provide you with our I2C Firmware for LES and/or support which is available as an additional purchase.       


 

H3-5

I2C-SDA (I2C Data)     RB4/AN10/SDA

H3-6

I2C-SCL  (I2C Clock)    RB6/SCL

 

 

SPI mode is made possible by utilizing SDI (H3-5), SCK (H3-6), /SS (H4-4) and SDO (H4-5) when enabled in firmware. Depending on which peripherals are active these pins have dedicated functions. By default the I2C and SPI peripherals are deactivated.

 

H3-5

SPI-SDI (Serial Data In – MOSI) RB4/AN10/SDA

H3-6

SPI-SCK (Serial Clock) 

RB6/SCL

H4-4

SPI-/SS  (Slave Select active low)

H4-5

SPI-SDO (Serial Data Out – MISO)


Compiling Firmware

To compile the supplied firmware you will need to install either MPLAB IDE and HI-TECH C for the PIC10/12/16 MCU Family which supports MPLAB debugging or Eclipse CDT Galileo-SR2, SDCC compiler as well as GPUTILS for your platform. Eclipse CDT requires the Java Run-time Environment which can be downloaded from java.com.  If Eclipse SDCC is used the sources come with a standalone makefile which is required to compile the project. Make sure to verify the makefile located in the source directory reflects the appropriate locations for the appropriate tools. 

Here is the default locations used by the project makefile:

 # GPUTILS Build Environment

SDCCDIR := c:\sdcc

GPUTILSDIR := c:\gputils

GPASM := $(GPUTILSDIR)\bin\gpasm

GPLINK := $(GPUTILSDIR)\bin\gplink

SDCC := $(SDCCDIR)\bin\sdcc

GPUTILS_HEADER_PATH := $(GPUTILSDIR)\header

GPUTILS_LKR_PATH := $(GPUTILSDIR)\lkr

LIBDIR := $(SDCCDIR)\lib\pic

 

Once all the tools are installed the picLink project archive may be extracted and imported into your workspace. Although we will not write your custom control program or configure your compiler for you free of charge we are happy to answer your questions and provide technical support.    

 

Device Programmers and Debuggers

USBPIC - http://usbpicprog.org/


Development Tool Links:


Eclipse CDT Galileo SR2 (requires Java JRE) 

Small Device C Compiler SDCC  and GPUTILS