Strange SerOut Problem


Closed Thread
Results 1 to 40 of 40

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by masosi View Post
    I've tried with and without a resistor on the Rx and Tx Pin, there's no difference.

    Does it make sense that the serial port seems to be sucking the life out of the circuit...?
    No, but it makes sense that without the resistor, you probably smoked all of your ports.

    But...back to the timing thing. The LED blinks, ok... Back to basics...
    Do you have an LCD? Make a counter, one second, power up the PIC, start your stopwatch. Wait for 100 seconds. If your watch and the PIC/LCD match up after 100 seconds, you can be reasonably sure you're within 1-2% of the 4Mhz clock speed. The longer you go, the more accurately you can count it up.

  2. #2
    Join Date
    Apr 2007
    Posts
    34


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    No, but it makes sense that without the resistor, you probably smoked all of your ports.
    I'm using the same COM port to program the PIC using JDM2 serial programmer and WinPic - there are no errors there, so the COM port should be fine!?

    Quote Originally Posted by skimask View Post
    But...back to the timing thing. The LED blinks, ok... Back to basics...
    Do you have an LCD? Make a counter, one second, power up the PIC, start your stopwatch. Wait for 100 seconds. If your watch and the PIC/LCD match up after 100 seconds, you can be reasonably sure you're within 1-2% of the 4Mhz clock speed. The longer you go, the more accurately you can count it up.
    I just did a Pause command of 2mins, timing it showed up as 2mins 2secs. Is this too far out?

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by masosi View Post
    I'm using the same COM port to program the PIC using JDM2 serial programmer and WinPic - there are no errors there, so the COM port should be fine!?
    But all of your PICs might not be! Or at least none of the ports you've hooked up to. Maybe not just PortA.1, but all of PortA, heck for that matter, maybe the whole chip. I don't know why...just maybe...

    I just did a Pause command of 2mins, timing it showed up as 2mins 2secs. Is this too far out?
    Nah, I'd chalk that amount of error up to you not clicking quite right on time, maybe a couple ms here and there in the program, etc.etc., ya know, all those things adding up. I'd say your clock is good within say 1-3%, far close enough for 300 baud, and probably up to 2400 baud.

  4. #4
    Join Date
    Apr 2007
    Posts
    34


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    But all of your PICs might not be! Or at least none of the ports you've hooked up to. Maybe not just PortA.1, but all of PortA, heck for that matter, maybe the whole chip. I don't know why...just maybe...
    Ok, I'll get my hands on another chip and give that a go.

    Quote Originally Posted by skimask View Post
    Nah, I'd chalk that amount of error up to you not clicking quite right on time, maybe a couple ms here and there in the program, etc.etc., ya know, all those things adding up. I'd say your clock is good within say 1-3%, far close enough for 300 baud, and probably up to 2400 baud.
    Well thats good news!

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by masosi View Post
    Ok, I'll get my hands on another chip and give that a go.
    Well, what I really meant was to give PortB a try.

  6. #6
    Join Date
    Apr 2007
    Posts
    34


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    Well, what I really meant was to give PortB a try.
    Ok, will do shortly.

    Another thought: Is it a good thing or a bad thing that this power supply doesn't have a ground (earth) to mains??
    DC shouldn't have earth, should it?

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by masosi View Post
    Ok, will do shortly.

    Another thought: Is it a good thing or a bad thing that this power supply doesn't have a ground (earth) to mains??
    DC shouldn't have earth, should it?
    You mean a ground lug, like the 3rd pin? If so, that's a chassis ground. If something shorts out inside the case of the PSU, the juice returns through that line. I wouldn't worry about it too much in a wall wart type power supply.

Similar Threads

  1. A Serial GLCD 128x64 Simple Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 8th March 2010, 20:58
  2. Serout to serial servo
    By azmax100 in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 12th August 2009, 16:46
  3. Strange Serout Behaviour
    By bluesmoke in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 12th August 2009, 04:12
  4. Advice-scrutiny for my serial controller
    By kevlar129bp in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 13th December 2008, 17:11
  5. Replies: 11
    Last Post: - 13th July 2005, 19:26

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