Simple Serout


Closed Thread
Results 1 to 5 of 5

Thread: Simple Serout

  1. #1
    Join Date
    May 2008
    Posts
    21

    Default Simple Serout

    I'm having trouble getting Serout/HSerout to work. I'm just trying at the moment to test it and get it working because in the near future i'll need to use it in a project. Right now i've just got a PIC18F2520 hooked up to a MAX3232E line driver which goes to my PC via com1. I've tested the MAX chip and hyperterminal both of which are operating correctly and at the proper rates. The primary reason i'm using the MAX right now is because in the project I know the cable will be around 20' so I think im going to need it. The end result is:

    €€€€€

    in hyperterminal. (For the record I dont see that exact character, but when I copy/paste thats what is put there, I see a C with a line throught the bottom center of it.)



    Include "modedefs.bas"

    DEFINE OSC 4

    CMCON = 7

    TXPin var PORTC.6
    RXPin var PORTC.7


    TRISC.6 = 0
    TRISC.7 = 1


    '************************************************* *******
    PAUSE 5000 'time to initialize


    Loop:
    SEROUT txpin, T9600,["P "] 'stop anything that's playing
    pause 1000
    goto loop

    end
    Last edited by Perrin`; - 17th June 2008 at 00:15.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    What happens at 2400 baud (or lower)?
    Internal or external oscillator?
    Crystal or resonator?
    Up or down?

  3. #3
    Join Date
    May 2008
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    Got it, thanks.

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Perrin` View Post
    Got it, thanks.
    So, it works? Or what?

  5. #5
    Join Date
    May 2008
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    Ya it works -- bad oscillator

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. Advice-scrutiny for my serial controller
    By kevlar129bp in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 13th December 2008, 17:11
  4. Keypad unlock (as in garage door possibly)
    By Fred in forum Code Examples
    Replies: 5
    Last Post: - 2nd April 2006, 04:26
  5. Replies: 4
    Last Post: - 7th September 2005, 14:11

Members who have read this thread : 1

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