Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 22nd May 2009, 02:32 PM   #1
Question UART enabling using PIC 16f877

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 .
Attached Files
File Type: asm my1.asm (6.4 KB, 67 views)

Last edited by olympus123456; 22nd May 2009 at 04:35 PM. Reason: UPDATE
olympus123456 is offline  
Old 22nd May 2009, 03:10 PM   #2
Default

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.
Pommie is offline  
Old 22nd May 2009, 03:35 PM   #3
Default

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.
olympus123456 is offline  
Old 22nd May 2009, 03:40 PM   #4
Default

Quote:
Originally Posted by olympus123456 View Post
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.

PIC16877 question about converting to Hex file
__________________
Eric " Good enough is Perfect "
I will NOT answer PM's requesting technical help, please use the Forum
PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

Last edited by ericgibbs; 22nd May 2009 at 03:42 PM.
ericgibbs is offline  
Old 22nd May 2009, 03:43 PM   #5
Default

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.
olympus123456 is offline  
Old 22nd May 2009, 03:44 PM   #6
Default

Quote:
Originally Posted by olympus123456 View Post
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.
__________________
Eric " Good enough is Perfect "
I will NOT answer PM's requesting technical help, please use the Forum
PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/
ericgibbs is offline  
Old 22nd May 2009, 03:47 PM   #7
Default

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 .
olympus123456 is offline  
Old 22nd May 2009, 03:54 PM   #8
Default

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.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com/
blueroomelectronics is online now  
Old 22nd May 2009, 04:09 PM   #9
Default

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.
Attached Thumbnails
UART enabling using PIC 16f877-project.jpg  

Last edited by olympus123456; 22nd May 2009 at 04:31 PM.
olympus123456 is offline  
Old 22nd May 2009, 04:27 PM   #10
Default

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.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com/
blueroomelectronics is online now  
Old 22nd May 2009, 04:32 PM   #11
Default

i have posted it .
Attached Files
File Type: asm my2.asm (6.4 KB, 16 views)

Last edited by olympus123456; 22nd May 2009 at 04:37 PM. Reason: UPDATED THE CODE - HELP BY ERIC
olympus123456 is offline  
Old 22nd May 2009, 04:44 PM   #12
Default

That's the program not the schematic.

PS if you don't comment your code it's very difficult to follow.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com/
blueroomelectronics is online now  
Old 22nd May 2009, 04:50 PM   #13
Red face

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 ?
Attached Thumbnails
UART enabling using PIC 16f877-project.jpg  
olympus123456 is offline  
Old 22nd May 2009, 04:58 PM   #14
Default

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.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com/

Last edited by blueroomelectronics; 22nd May 2009 at 04:59 PM.
blueroomelectronics is online now  
Old 22nd May 2009, 05:09 PM   #15
Default

I will continue working on it tomorrow sort of exhausted and damn tired , thank blueroom and others. be back tomorrow.
olympus123456 is offline  
Reply

Tags
16f877, pic 16f, rs-232, uart

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
IR And UART gramo Micro Controllers 34 18th August 2009 06:22 AM
Uart ananth85 Electronic Projects Design/Ideas/Reviews 8 27th February 2009 11:11 AM
PIC 16F877 UART receive yueying_53 Micro Controllers 0 19th October 2008 08:52 AM
What electronics circuit have to do with VoIP enabling?? anjali4india General Electronics Chat 5 16th October 2008 09:26 PM
uart amenoera Electronic Projects Design/Ideas/Reviews 1 17th August 2005 06:31 PM



All times are GMT. The time now is 11:30 PM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker