Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PSP mode PIC16F877 help!

Status
Not open for further replies.

viren_r

New Member
hi i am having trouble communicating with the PIC via the parallel port of the PC. I am trying to send a byte to port D via the parallel cable however the value on port D does not seem to change until i stop running the program on the PIC and reset to the begining of the program.I am sure the byte is being sent by the PC but i am not sure if the PIC is reading it correctly. i think i am probably using the wrong control settings for WR,RD,CS . could anyone help me with the steps needed to send data to the PIC and reading the value???
any help would be greatly appreciated.thanks
 
viren_r said:
hi i am having trouble communicating with the PIC via the parallel port of the PC. I am trying to send a byte to port D via the parallel cable however the value on port D does not seem to change until i stop running the program on the PIC and reset to the begining of the program.I am sure the byte is being sent by the PC but i am not sure if the PIC is reading it correctly. i think i am probably using the wrong control settings for WR,RD,CS . could anyone help me with the steps needed to send data to the PIC and reading the value???
any help would be greatly appreciated.thanks

What are you actually wanting to do?, using a parallel connection is VERY wasteful on I/O - and hardly ever needed, a simple serial connection is usually fast enough.
 
lol yea i think that using a serial cable might be easier too,but its a project for class and they specified via a parallel cable lol. Basically we need to enter a speed on the PC that determines the speed of a motor controlled by the PIC.
 
also what operating system are you running ?
i have seen numerous people on this site trying to use the parallel port only to have windows fight them every step of the way..
if this is your case try searching this site for parallel port , there is something you have to add or change , i think it is a .cfg file, but not sure..
hope this helps..
 
thanks a lot ill check them out.i am using win98 running turbo C. I connected a set of led bars to the data lines of the parallel port so i could see the value on the data lines and it works,the value that i type at the PC is being sent but problem is probably on the PIC side maybe its my timing or something.
 
viren_r said:
thanks a lot ill check them out.i am using win98 running turbo C. I connected a set of led bars to the data lines of the parallel port so i could see the value on the data lines and it works,the value that i type at the PC is being sent but problem is probably on the PIC side maybe its my timing or something.

Win98 is ideal for this, because it doesn't restrict direct access to the ports (as NT based Windows do).

There's no need to use any of the PIC hardware to do this task, simply monitor the hanshake lines in a loop, and read the port when data is ready.

However, as it's a school task, you are obviously limited by the requirements of the task - but it's a pretty silly thing to use a parallel port for :lol:

BTW, does it specify you have to use the port as a parallel port?, you could use a single pin and use it to create a serial port - just as PIC programmers do :lol:
 
thanks fellas for all the help.if i had more time i would have tried the advice in your last post nigel. the lab is closed for the semester now. but im sure i could use your help next semester. thanks again
 
good evening !
i've to do an application of paralel slave port mode in pic16F877! could any one help me
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top