HSEROUT Newbie question/problem


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Or the config fuses are not set correctly, or the OSC speed is not the right one OR the MAX232 circuit is bad OR there's a little hardware problem, OR the serial communicator is not set properly OR all DEFINEs are not written in UPPERCASE.

    Bellow is tested and work on a 16f877.. but it shouldn't make any difference whatever PIC you're using...
    Code:
    define OSC 12
    DEFINE HSER_RCSTA 90h
    DEFINE HSER_TXSTA 20h
    DEFINE HSER_SPBRG 77 ' 2400 Bauds
    DEFINE HSER_CLROERR 1
    
    START:
        hSEROUT ["HELLO, THIS IS A TEST",13,10]
        PAUSE 100
        GOTO START
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=959&stc=1&d=1152544022 ">
    Attached Images Attached Images  
    Last edited by mister_e; - 10th July 2006 at 16:07.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    mmm... what about if ...
    Code:
    define OSC 12
    RCSTA1=$90
    TXSTA1=$20
    SPBRG1= 77 ' 2400 Bauds
    DEFINE HSER_CLROERR 1
    
    START:
        hSEROUT ["HELLO, THIS IS A TEST",13,10]
        PAUSE 100
        GOTO START
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Mark Scotford's Avatar
    Mark Scotford Guest


    Did you find this post helpful? Yes | No

    Default

    Steve, I get this out, and I have my Serial Communicator set up the same as the prevous posters

    à€pÇàŽøàŽàøààŽpÇàŽüàŽàpÇàŽøàŽàøà àŽüüøàŽàøàŽàpÇàŽpÇàŽààŽüàŽàpÇàŽøàŽ àøààŽpÇàŽüàŽàpÇàŽpÇàŽøàŽàøààŽüü øàŽàøàŽàpÇàŽpÇàŽààŽüàŽàpÇàŽøàŽàøà àŽpÇàŽüàŽàpÇàŽpÇàŽøàŽàøààŽüàŽàpÇàŽøàŽ àøààŽpÇàŽààŽüàŽàpÇàŽøàŽàøààŽpÇ àŽüàŽàpÇàŽpÇàŽààŽ

  4. #4
    Join Date
    Oct 2003
    Location
    holland
    Posts
    251


    Did you find this post helpful? Yes | No

    Default

    Is your powersupply oscillating?
    Did you mount a capacitor over the supply points of the chips?

  5. #5
    Mark Scotford's Avatar
    Mark Scotford Guest


    Did you find this post helpful? Yes | No

    Default

    Yep, all chips have a 104 Cap near-by. Hold fire a while on this problem chaps. I tried programming an EPROM version of the processor instead of using my beloved ICEPIC2, and I am getting nothing happening, unfortunetly I have to go out now, but will continue tomorrow.

  6. #6
    Mark Scotford's Avatar
    Mark Scotford Guest


    Did you find this post helpful? Yes | No

    Default

    Appologies are due, especially to Steve and Matt. I made the fundamental mistake of believing what I was being told, a colleague said he had given me a known working board. The problem was the Loading Caps on the Oscillator crystal were of the wrong value (too high a value) which were not enough to completely cripple my ICEPIC2 but were enough to affect the speed.

    I am now getting comms. and I did that thing of jumping up and down when the word "hello" appeared in Serial Communicator.

    Thanks to everybody who helped and sorry if I wasted your time.

  7. #7
    Mark Scotford's Avatar
    Mark Scotford Guest


    Did you find this post helpful? Yes | No

    Default

    Just as a side issue, I plugged my ICEPIC2 back in, and I got garbage out again, on checking I find that ICEPIC2 uses its own clock of 4Mhz, (in my defence I got this secondhand so I do not have the manual) 4Mhz is the frequency I normally use on my PIC projects, so it has not been an issue before. Anyway just changed the crystal to 4Mhz, changed the settings in my code, run ICEPIC2 again and everything is working fine, so I am off and running, thanks to all.

Similar Threads

  1. I2C Slave with a PIC
    By ralfmayr in forum mel PIC BASIC Pro
    Replies: 129
    Last Post: - 21st August 2016, 17:44
  2. hserin and sms controller
    By xxxxxx in forum mel PIC BASIC Pro
    Replies: 25
    Last Post: - 10th February 2010, 15:49
  3. HSEROUT and Commas, What? Help Me Understand
    By altech6983 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 20th July 2009, 19:12
  4. Is HSEROUT corrupting bit 7 ?????
    By Robert Wells in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 23rd October 2008, 16:26
  5. Controlling an 240x128 LCD Touchpanel Display
    By Vincent in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 7th June 2006, 23: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