+ Reply to Thread
Page 1 of 2
1 2 Last
Results 1 to 15 of 16

Thread: UART enabling using PIC 16f877

  1. #1
    olympus123456 Newbie
    Join Date
    Mar 2009
    Location
    UAE
    Posts
    21

    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
    Last edited by olympus123456; 22nd May 2009 at 04:35 PM. Reason: UPDATE


  2. #2
    Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent
    Join Date
    Mar 2005
    Location
    Brisbane Australia
    Posts
    6,696

    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.

  3. #3
    olympus123456 Newbie
    Join Date
    Mar 2009
    Location
    UAE
    Posts
    21

    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.

  4. #4
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,456
    Blog Entries
    9

    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
    Last edited by ericgibbs; 22nd May 2009 at 03:42 PM.
    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/

  5. #5
    olympus123456 Newbie
    Join Date
    Mar 2009
    Location
    UAE
    Posts
    21

    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.

  6. #6
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,456
    Blog Entries
    9

    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/

  7. #7
    olympus123456 Newbie
    Join Date
    Mar 2009
    Location
    UAE
    Posts
    21

    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 .

  8. #8
    Help us help you blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent
    Join Date
    Jan 2007
    Location
    Toronto, Canada
    Posts
    10,565
    Blog Entries
    5

    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/

  9. #9
    olympus123456 Newbie
    Join Date
    Mar 2009
    Location
    UAE
    Posts
    21

    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 Images
    Last edited by olympus123456; 22nd May 2009 at 04:31 PM.

  10. #10
    Help us help you blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent
    Join Date
    Jan 2007
    Location
    Toronto, Canada
    Posts
    10,565
    Blog Entries
    5

    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/

  11. #11
    olympus123456 Newbie
    Join Date
    Mar 2009
    Location
    UAE
    Posts
    21

    i have posted it .
    Attached Files
    Last edited by olympus123456; 22nd May 2009 at 04:37 PM. Reason: UPDATED THE CODE - HELP BY ERIC

  12. #12
    Help us help you blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent
    Join Date
    Jan 2007
    Location
    Toronto, Canada
    Posts
    10,565
    Blog Entries
    5

    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/

  13. #13
    olympus123456 Newbie
    Join Date
    Mar 2009
    Location
    UAE
    Posts
    21

    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 Images

  14. #14
    Help us help you blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent
    Join Date
    Jan 2007
    Location
    Toronto, Canada
    Posts
    10,565
    Blog Entries
    5

    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 by blueroomelectronics; 22nd May 2009 at 04:59 PM.
    Bill
    Smart Kits build Smart People

    http://www.blueroomelectronics.com/

  15. #15
    olympus123456 Newbie
    Join Date
    Mar 2009
    Location
    UAE
    Posts
    21

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

+ Reply to Thread
Page 1 of 2
1 2 Last

Similar Threads

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

Tags for this Thread