element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Serial Config help.
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 31 replies
  • Subscribers 405 subscribers
  • Views 3510 views
  • Users 0 members are here
Related

Serial Config help.

YT2095
YT2095 over 13 years ago

I need to configure the Serial on an Arduino to match a very strange Printer, I`m not even sure it`s possible with an Arduino?

it needs to be:

 

1200 Baud

1 Start bit

7 Data bits (LSB first)

1 Parity Bit (Even)

and 2 Stop Bits.

 

Does anyone know how config for this in Arduino, or even if it`s possible?

 

Thanks image

  • Sign in to reply
  • Cancel

Top Replies

  • R_Phoenix
    R_Phoenix over 13 years ago in reply to billabott +1
    SoftwareSerial is no different than useing the built in Serial port. I don't know of anything that even still uses the start bit. As far as I know, the serial port on an Arduino is only 3 wires, RX, TX…
Parents
  • SGarciaV
    0 SGarciaV over 13 years ago

    Perhaps this thread will help:

     

    http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1243894373

     

    Good luck! Salvador

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • YT2095
    0 YT2095 over 13 years ago in reply to SGarciaV

    I`d looked at that earlier today, and the parts I could make sense of don`t address the Start Bit issue, that`s why I was even wondering if it was possible?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • billabott
    0 billabott over 13 years ago in reply to YT2095

    Have you written some experimental code and wired it up yet?

    What was the printer originally designed to connect to? 

    Can we assume the serial port on a PC?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • YT2095
    0 YT2095 over 13 years ago in reply to billabott

    it`s a PXP40 that goes on a PX1000 Telex machine, the connector is like a stereo earphone jack, no PC involvment per se.

    as for test "code" I`v tried 3 different terminal progs, and non of them work as there`s no config for a start bit image

    the printer Does work however as I tried it on the PX1000.

     

    see here: http://www.cryptomuseum.com/crypto/philips/px1000/index.htm

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • billabott
    0 billabott over 13 years ago in reply to YT2095

    Have you looked at this page about RS-232 Serial or this page?

     

    The PXP-40 Printer is similar to the Atari 800 40 Column Thermal Printer (early 1980s)  that I own.

     

    Some systems use:  (image)

    • base ring: ground (pin 5 of DB9)
    • middle ring: serial output from Device1 to serial input of Device2 (pin 2 of DB9)
    • tip of pin: serial output of Device2 to serial input of Device1 (pin 3 of DB9)

     

    Have you been able to determine if it uses standard ASCII?

     

    Adding a start bit should not be too difficult. 

     

    You need to heed the warning about connecting 12 volt device to the i/o of the 5 volt arduino when using RS-232RS-232.

     

    Soon you will be happily running this program on your repurposed thermal printer.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • YT2095
    0 YT2095 over 13 years ago in reply to billabott

    the 12v/5v thing isn`t an issue, I`v dealt with all that stuff before and simply use a cmos inverter, I`ll not be tapping the power anyway, just the GND and the Data (sleeve and tip), and the data is +/-5v capped.

    I fully understand What it wants, I`v just no idea how to make an Arduino do it, and don`t really want to mess around building Parallel to Serial convertor out of 74xx series chips, and messing around with clock divisions for framing etc...

    Happily the one "Normal" part about this is that it IS ASCII code, but that`s about where it ends.

     

    it`s a nice little printer and I managed to save it`s life and change out the batteries before too much damage was done, and I think it would make a great addition to ZED.

     

    the goal is have 8n1 serial IN and this crazy protocol come OUT of the arduino (same baud naturally), to drive it.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • billabott
    0 billabott over 13 years ago in reply to YT2095

    All right then, YT2095, my research on arduino.cc indicates that

    #include "SoftwareSerial.h" would be a good beginning.

     

     

    /*
       Software serial multple serial test
     
      Receives from the hardware serial, sends to software serial.
      Receives from software serial, sends to hardware serial.
     
      The circuit:
      * RX is digital pin 2 (connect to TX of other device)
      * TX is digital pin 3 (connect to RX of other device)
     
      created back in the mists of time
      by Tom Igoe
      based on Mikal Hart's example
      modified by Wm. A. T. Bottger, 01 May 2012
     
      This example code is in the public domain.
     
      */

    #include <SoftwareSerial.h>

    SoftwareSerial mySerial(2,3); // RX, TX   i/o pins on Uno

    void setup() 
    {
       Serial.begin(19200);
       Serial.println("Enter text to be printed:");  
       // Displayed on Serial Monitor
       // using Digital pins  1

       // set the data rate for the SoftwareSerial port
       mySerial.begin(1200);
       //  Will be updating this shortly  -WATB
       //   While you are waiting, why not try it out as it is?
       //mySerial.println("Arduino Uno sending text:");
       // Output onto device connected to UART
       // using digital pin 3
    }

    void loop() // run over and over
    {
       if (mySerial.available())
         Serial.write(mySerial.read());
       if (Serial.available())
         mySerial.write(Serial.read()|0x80);
    }

     


     

    If you are using Arduino 1.0 then  this include is already part of 1.0

    and the following are available:

    Functions

    • SoftwareSerial()
    • available()
    • begin()
    • isListening()
    • overflow()
    • peek()
    • read()
    • print()
    • println()
    • listen()
    • write()
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • R_Phoenix
    0 R_Phoenix over 13 years ago in reply to billabott

    SoftwareSerial is no different than useing the built in Serial port. I don't know of anything that even still uses the start bit. As far as I know, the serial port on an Arduino is only 3 wires, RX, TX, and Ground. So you won't be able to configure the flow control.

     

    However I would sugest asking this on the Arduino Forums. if you haven't already.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • R_Phoenix
    0 R_Phoenix over 13 years ago in reply to billabott

    SoftwareSerial is no different than useing the built in Serial port. I don't know of anything that even still uses the start bit. As far as I know, the serial port on an Arduino is only 3 wires, RX, TX, and Ground. So you won't be able to configure the flow control.

     

    However I would sugest asking this on the Arduino Forums. if you haven't already.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube