Jump to content
43oh

Serial (without emulation side)?


Recommended Posts

First off, let me say thanks for Energia. I love it. I am having great fun with the Launchpad and Energia.

 

I'm working on a project that uses the Hardware UART to communicate with a POS printer. Everything works great while I am connected via USB through the 'emulation' side. I have my RXD and TXD connected as shown in the wiki so they

look a little like this =||| with the RX and TX perpendicular to the other three RST, TST and VCC. So far so good. I send data to the printer (via a max232) and it comes out on the paper.

 

Maybe this is simple, and I'm just missing a key detail. If I disconnect the VCC and RST and TST, or disconnect all five jumpers on J3

Nothing comes out of the printer. I am powering the board off AA batteries. I have tried a few other programs to ensure that the rest of my setup is good. I can play music on a speaker, I can control some RGB LEDs, but I cannot send data out of those pins marked UART on the board.

 

Can anyone point me in the right direction? My code is super simple, I've just written a little hello world to simplify everything:

 

void setup(){
 Serial.begin(9600);
}

void loop(){
 Serial.print("Hello World");
 Serial.write(0x0A);
 delay(20000);
}

 

The pins I'm using are P1.1 and P1.2 (marked UART) and they go out to a MAX232 board and then off to the printer.

 

EDIT: I wanted to add I'm using the 2553 chip, not the 2452 and a 1.5 rev board.

Thanks!

Link to post
Share on other sites

I just wanted to see if it was printing, without printing it over and over and over 8-). I plug it in, see if it prints and then unplug it. I'm more concerned with getting an ftdi that's not surface mount, or a breakout that doesn't come with a USB connector.

 

Maybe I should go software serial and use the MAX 232 I already have made?

Link to post
Share on other sites

Several comments:

If you are turning ON the LaunchPad and the printer simultaneously,

use a delay before sending the message, maybe the printer needs more time to begin the reception...

 

LaunchPad VCC = 3.6 Volts

Two AA batteries= 3.0 Volts or less

Three AA Batt. = 4.5 Volts or less

 

How do you power the MAX232 ? (Supply voltage range 4.5~5.5V).

 

Setting time of the MAX232 after power on?

If you are using a MAX232 is good practice to place a delay routine

to ensure that the charge pump voltage has risen to its proper operating level.

 

Logic levels betwen MAX232 and the launcPad?

 

just ideas, trying to help... :thumbup:

Link to post
Share on other sites
Thanks SeuPay,

 

I am powering the board off 2 AA (Alkalines) for ~3.0v. Those are going into the VCC and GND on the headers at J1 and J2.

 

The board with the MAX232 is powered from the Launchpad from J6 VCC and GND. maybe J6 is pushing 5v when I'm on USB?

 

Thanks for all the help on this.

 

Nope, J6 VCC/GND is same as J1/J2 and J3 VCC/GND. There is no 5v source south of the emulator dotted line.

 

That said, plenty of people run Max232 off 3.3v without issue. That's one of the main ways people got dd-wrt compatible La Fonera routers connected to serial. While it is recommended 5v, it works at 3v, but you suffer from possible reliability issues (and slightly lower output voltage, but within specs).

 

Most of the time it's just cheaper to use a usb-ttl adapter, they are like 3 bucks on ebay (Actually, there are a bunch for like 1.80 or slightly more).

Link to post
Share on other sites

As I understood, problem is in link between uC uart interface (MAX chip) and POS printer, when the uC is running on batteries? So, uC is sending data (by itself) over uart to printer, and printer is printing, without any connection to PC, right?

 

In this case I don't understand for what on this topic FTDI need to be used? There is no need to have any connection to PC, only uC to POS printer?

 

If I have the right picture, than solution for your problem, is in using some MAX chip that can work (by data sheet spec) in range 3.0V - 5V (not the standard MAX232 chip that you are using). For example, I am using MAX3243. And than connect Vcc/GND lines of this chip to MSP430 Vcc/GND lines, to be on same voltage.

Link to post
Share on other sites

I think that 3.3V is enough to power the MAX232 but the margin is very close. 3.0V (or less depending on charge) seems to be below the margin. Using a wall wart will supply a constant 3.3V through the regulator that seems to be enough to trigger the logic on the MAX232.

 

I think the FTDI entered the conversation as a way to allow you to program the chip without having the emulation side connected in order to save power if using a battery. The MAX3232 might be a valid option to allow the device to work on the battery running at or below 3.0V.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...