Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

I want to control the printer with PIC16F877A

Status
Not open for further replies.

haroonrasheed_a

Newbie level 4
Joined
Nov 26, 2007
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,317
I was trying to write a software for controlling the printer through PIC16F877A. I need idea to start this. Pls anybody help me how to start it...
 

well as u know printers use steppers motor, so u will need to develop a program to controls your stepper motor first
 

You have not specified the type of printer you want to drive. Are you planning to drive a printer machanism, parallel printer or serial printer ?

If it is printer mechanism, then it is a bit complex. Parallel and serial printers are easy to drive.

Cheers

Ravi
 

Actually i am going to interface parallel printer with PIC 16F877A. I just want to get the data from the computer into the PIC controller and add some more data with that (ie., Nothing but to add some more character or string) sent it to the printer. For that i need to know how to drive the printer with PIC controller.
For doing this, first of all I need to print some character or string directly from the PIC 16F877A controller. can u pls help me in guiding me how to print a character or string directly into the printer.
 

haroonrasheed_a said:
Actually i am going to interface parallel printer with PIC 16F877A. I just want to get the data from the computer into the PIC controller and add some more data with that (ie., Nothing but to add some more character or string) sent it to the printer. For that i need to know how to drive the printer with PIC controller.
For doing this, first of all I need to print some character or string directly from the PIC 16F877A controller. can u pls help me in guiding me how to print a character or string directly into the printer.

It is very simple. Interface the 8 data lines and 1 STROBE line to the parallel printer. Minimum needed is 9 lines. If you need more control then interface BUSY, ERROR and other lines.

Please study the printer control codes.

Set the 8 bits of data and take the strobe line high or low (I am not sure as of now, please check the printer interfacing timing diagram.) for a period of 5 mS. Then send the next character.

If you need more information, please let me know.

Cheers

Ravi
 

Hi,

Maybe this document can helps you.

This document explain how the parallel port works and how is the interfacing between the pc and the printer. But you can replace the pc with your "PIC" and the stucture will be the same ;-).

It's a very helpfull document, you should read it.

Best regards.

Edit:

Sorry but the document is already posted, and I can't post it again.

Here is the link where is posted:



Regards.
 

Thanks for the replies..
Is it possible for you to provide me with simple code for printing a character from PIC.
it will be great for me to move forward in my project.
Thanks in advance..

Regards
Haroon
 

Is it possible for you to provide me with simple code for printing a character from PIC.
To write one character .....

movlw 'A'
movwf portb

bsf portc,strobe
call delay5ms
bcf portc,strobe

call delay2ms
........ continue with other characters.

Cheers

Ravi
 

Actually i am using ICD 2 in MPLAB IDE (ver 6.05) to connect with PIC programmer.i have problem in connecting to PIC programmer.It says that "Unable to connect" i tried all the option whichever they mentioned in help option. pls help me sort out this problem....
One more request can u please provide the same assembly code for printing a character code in c language....
It will be helpful for me...thanks in advance..
 

Actually i am using ICD 2 in MPLAB IDE (ver 6.05) to connect with PIC programmer.i have problem in connecting to PIC programmer.It says that "Unable to connect" i tried all the option whichever they mentioned in help option. pls help me sort out this problem
Please go through for your problem with ICD.

One more request can u please provide the same assembly code for printing a character code in c language....
It will be helpful for me...thanks in advance..
It may be like this.

portb='A';
strobe=1;
delay(5000);
strobe=0;

delay(2000);

Where strobe is say porta.1

I am new to C and will not be able to help you much in C.

Cheers

Ravi
 
haroonrasheed_a said:
I was trying to write a software for controlling the printer through PIC16F877A. I need idea to start this. Pls anybody help me how to start it...


Greetings,

First, according the printer you wanna write the PIC16F877A software for, so, find the commands of that printer model, that printers have a set of "commands" which you can control the printer through.

Second, int the PIC side, build a PARALLEL interface so we can interface printer and Microcontroller for send and receive data through the port.

Third, first begin the early steps....

Good luck
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top