Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 19, 2024, 12:05:44 12:05


Login with username, password and session length


Pages: [1]
Print
Author Topic: serial to parallel  (Read 3679 times)
0 Members and 1 Guest are viewing this topic.
free
Active Member
***
Offline Offline

Posts: 115

Thank You
-Given: 71
-Receive: 13


« on: November 02, 2007, 02:02:37 02:02 »

Does anyone know the schematic and source code for serial to parallel (centronics) converter using PIC or AVR?
Could you help me please?
Logged

Some dream to escape reality, some to change it forever.
- Soichiro Honda -
nacho1
Newbie
*
Offline Offline

Posts: 32

Thank You
-Given: 24
-Receive: 11


« Reply #1 on: November 02, 2007, 02:21:22 02:21 »

I don't what is your application, please coment more about it. But I can tell you if you want to send/recieve a byte via serial port with a terminal program, and convert the data to parallel you should see a c compiler. its the easiest way to do it. I recommend you mikroC.
an example in c:

void main (void)
{
TRISC=0x00;  // portc as an output to use the hardware usart
TRISB=0x00; //select the I/O ports
TRISA=0xFF;
USART_Init(bauds); //set the bauds
while (1)
  {
   USART_Write(PORTB); //Read the value of port b and send it via rs232
   USART_Read(PORTA); //Write in the port A the value recieved from the pc via rs232
   }

}

If you want to adapt the comunication, for example a usin  a serial port to drive a parallel printer then you have to emulate the handshake of the SPP. And that is more complicated.
Logged
free
Active Member
***
Offline Offline

Posts: 115

Thank You
-Given: 71
-Receive: 13


« Reply #2 on: November 02, 2007, 02:59:52 02:59 »

Thanks nacho1

I want to print characters from microcontroller's serial pins to my parallel Epson printer directly using ESC command. I really need the converter.
Logged

Some dream to escape reality, some to change it forever.
- Soichiro Honda -
nacho1
Newbie
*
Offline Offline

Posts: 32

Thank You
-Given: 24
-Receive: 11


« Reply #3 on: November 03, 2007, 09:54:50 21:54 »

which epson printer are you using?. some have serial input eg: lx-300
Logged
free
Active Member
***
Offline Offline

Posts: 115

Thank You
-Given: 71
-Receive: 13


« Reply #4 on: November 04, 2007, 12:12:38 00:12 »

I used old epson lx-800 w parallel port
Logged

Some dream to escape reality, some to change it forever.
- Soichiro Honda -
nacho1
Newbie
*
Offline Offline

Posts: 32

Thank You
-Given: 24
-Receive: 11


« Reply #5 on: November 04, 2007, 03:06:50 03:06 »

the lx800 came with a serial port to recieve data. you should check if it has a db-25 female conector at the printer.
if you have luck yuo can skip the converter
Logged
free
Active Member
***
Offline Offline

Posts: 115

Thank You
-Given: 71
-Receive: 13


« Reply #6 on: November 06, 2007, 12:58:45 00:58 »

You're right nacho1.

I need the converter because the serial port is unusable,  problem in hardware.
I get it from my friend with this condition.
Could you help me?
« Last Edit: November 06, 2007, 01:05:04 01:05 by free » Logged

Some dream to escape reality, some to change it forever.
- Soichiro Honda -
nacho1
Newbie
*
Offline Offline

Posts: 32

Thank You
-Given: 24
-Receive: 11


« Reply #7 on: November 06, 2007, 05:08:57 17:08 »

Have you setup the bauds, data bits, stop bits, and paritybits correctly ? is the serial port from the pc or the printer unsuable?
« Last Edit: November 06, 2007, 07:35:29 19:35 by nacho1 » Logged
free
Active Member
***
Offline Offline

Posts: 115

Thank You
-Given: 71
-Receive: 13


« Reply #8 on: November 06, 2007, 11:05:56 23:05 »

Serial port's printer is unusable.
PC serial port is working fine. I tried it with another serial printer and it's working.


« Last Edit: November 06, 2007, 11:13:01 23:13 by free » Logged

Some dream to escape reality, some to change it forever.
- Soichiro Honda -
nacho1
Newbie
*
Offline Offline

Posts: 32

Thank You
-Given: 24
-Receive: 11


« Reply #9 on: November 07, 2007, 03:31:30 03:31 »

ok, First check this jumper configuration

Epson LX800 and the 390
Application :   Epson LX800
Vendor :   Epson
Platform :   Serial Printer
Version :   NA

Notes :   Select "Epson" Presets in I/O configuration menu. Ensure that both the serial DIP switches and the mode DIP switches are set properly on the printer. Set jumper J8B on the serial interface board to Off (disconnected). This has the effect of disabling XON/XOFF flow control.
    
Epson I/O Presets
Baud   = 9600
Pin5     = CTS
Format   = NEW
rci    = off
Dec.Pt.   = ON
CR     = CRLF
comp   = off
Xmit    = Manual
Width    = Full


 
Serial DIP Switches - Epson LX800, LX810
Switch Bank #1            Switch Bank #2
Number   Description            Number     Description
1   OFF  8 Bit Word       1   ON   Serial I/O Enable
2   OFF  No Parity       2   ON   Buffer Enable
3   OFF                   3   OFF  Buffer FIFO Control
4   OFF                   4   OFF
5   OFF  9600 Baud       5   OFF  Self Test Mode
6   ON                   6   OFF
7   OFF           
8   OFF           


 
Mode DIP Switches - LX800
Switch Bank #1                                    Switch Bank #2
Number   Description                    Number     Description
1   OFF  Normal characters        1   OFF  11 inch paper
2   OFF  Unlashed zero       2   OFF  Tractor feed
3   OFF  Italic character table    3   OFF  No Skip over Perf
4   OFF  Paper-out detection       4   OFF  NO auto CR/LF
5   OFF  Print quality = draft           
6   ON USA character set           
7   ON           
8   ON

Second try to disable XON/XOFF flow control. and check the cable to ensure that only TX, RX & GND are present

and third as last resort you should emulate the centronics handshake with the pic. this is not hard, but I dont know how is the behaivor of the signals. last month I tryed to use the parallel port in EPP mode , I configure the bios, and w98 & dos recognize the port in that mode. but due to certains incompatibilitys of that specific chipset i cant use the port.
once again I dont know behaivor of the signals, maybe you should see with an osciloscope, and emulate  the signals with the pic, but i think the signal and timmings may change with the driver in use.
check this link http://HTTP://WWW.BEYONDLOGIC.ORG there is a lot of information about the ports.
Logged
free
Active Member
***
Offline Offline

Posts: 115

Thank You
-Given: 71
-Receive: 13


« Reply #10 on: November 07, 2007, 11:05:19 11:05 »

thanks for your kindly help nacho1.

I will try it soon
Logged

Some dream to escape reality, some to change it forever.
- Soichiro Honda -
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC