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.

UART enabling using PIC 16f877

Status
Not open for further replies.

olympus123456

New Member
Hi , i want to use the PIC and interface it using rs-232 cable and display it on visual basic.
I m attaching my code in the notepad. please can some one help .
 

Attachments

  • my1.asm
    6.4 KB · Views: 281
Last edited:
I've had a quick look at your code and you have written a lot of code. You seem to have a good grasp of general programming but there are some obvious errors in your code. You don't save or restore the context in your ISR and you don't have a retfie at the end of it. My suggestion is that you try to get simple programs working first and work up to something as complex as you posted.

Mike.
 
I am using this code for real time display in the computer through visual basic and rs-232 cable. I have successfully created hex file and build was succesful too. If you could help in writing it , please bcuz i have put a lot of effort , i would be grateful if someone could help me fix it. pleaseeeee.
 
I am using this code for real time display in the computer through visual basic and rs-232 cable. I have successfully created hex file and build was succesful too. If you could help in writing it , please bcuz i have put a lot of effort , i would be grateful if someone could help me fix it. pleaseeeee.

WHY have you started a new thread while Im still answering your first one.:(

https://www.electro-tech-online.com/threads/pic16877-question-about-converting-to-hex-file.93301/
 
Last edited:
its because i got nervous after all this of writing the program sweating and crying and all this , i find out that something is missing . i felt broken . i really need to finish this by may end . i m sorry dude.
 
its because i got nervous after all this of writing the program sweating and crying and all this , i find out that something is missing . i felt broken . i really need to finish this by may end . i m sorry dude.

I'm sweating and crying trying to help you sort out the program, dont be so impatient, Im not on the clock.;)
 
sorry eric. i m soo sorry , i know i bcame impatient bcuz of 3 months of work on this code dude. really thank you soo much . lastly, shuld i just the code that u wrote in the top or end. how does it work . if u dont mind could u tell me .
 
Can you post a schematic of your device. Have you built it yet?

PS your PK2 can debug the 16F877 this may help with working the bugs out.
 
I have not yet completed it . i need some more time , because i have to find photoelectric sensors , ecg electrodes . I am attaching the schematic of the circuit , its not in eletronic workbench its drawn by hand.
 

Attachments

  • project.JPG
    project.JPG
    51.6 KB · Views: 1,209
Last edited:
You've only got a week to finish the schematic (post it as we can help spot errors like missing bypass caps etc) get parts, program, built and test it. Good luck.
 
Its ok blueroom , i got to hex file and ERIC helped me in enabling the pins. I m posting the schematic. I hope programming the PIC is solved , still i have to send it to the PIC . i bought pickit 2 , but i dont know how to proceed, how to send the hex file to the PIC. if you can help me on that.
Also about visual basic, do u have any knowledge of it ?
 

Attachments

  • project.JPG
    project.JPG
    51.6 KB · Views: 154
Well you will need 0.1uF decoupling caps near the VDD, VSS pins. 16V caps will work with the MAX232.

You have to connect the PK2 to VPP, VDD, VSS, PGC & PGD it will also debug if you leave it connected.
 
Last edited:
Three tips for you:

1) Add comments to your code.

2) Don't attempt to write your entire program in one go, write it in small pieces, debug that part, then add the next part.

3) Don't use interrupts unless there's a definite need to, it makes your program more complicated, and FAR more difficult to debug.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top