PC to EUART on pic 16F688


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by docaberle View Post
    I'm using the internal oscillator at 4MHz and running at 2400 baud.
    That's most likely your problem right there. Go with external crystal, resonator, oscillator, something...
    But since you said you're having overrun errors, look at the 'F688 datasheet in the OSCTUN section and dial down your internal clock a couple of notches and see what happens.
    Problem is, this will only work at that particular battery voltage, that temperature, that day of the week, when the moon is in that particular phase, etc.etc.etc...
    Just save the trouble and go with an external clock source...
    Could it be something else causing the problem?
    Sure...trying to SEROUT while at the same time receiving serial data in the hardware...bad idea... I'd also be willing to bet if you took all of those SEROUT statement and made it so that each SEROUT statement only did one, two, maybe three characters at a time, you're overrun errors might go away, since it'll give the program/hardware a chance to interrupt and empty out the incoming hardware serial buffer.
    Last edited by skimask; - 20th October 2008 at 20:46.

  2. #2
    Join Date
    Mar 2005
    Location
    Novi Sad, Vojvodina
    Posts
    7


    Did you find this post helpful? Yes | No

    Default

    "SPBRG = 25 ' Set baud rate to 2400 for USART" ????

    SPBRG = 25 ' Set baud rate to 9600 for USART !!!!!

  3. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Emil G View Post
    "SPBRG = 25 ' Set baud rate to 2400 for USART" ????

    SPBRG = 25 ' Set baud rate to 9600 for USART !!!!!
    ???? SPBRG = 25 is 9600 at 16 mhz it is 2400 at 4mhz
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. Replies: 24
    Last Post: - 2nd October 2017, 11:35
  2. Send data PIC to PC
    By konter in forum Off Topic
    Replies: 6
    Last Post: - 25th December 2009, 22:04
  3. Replies: 67
    Last Post: - 8th December 2009, 02:27
  4. HSERIN & Interupts (aka controlling PIC programs from a remote PC)
    By HankMcSpank in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 17th June 2009, 14:46
  5. Replies: 11
    Last Post: - 12th July 2008, 02:36

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts