how do you clear the serial buffer at power up?


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Jun 2006
    Location
    Glasgow, Scotland
    Posts
    26

    Smile how do you clear the serial buffer at power up?

    Hi there, I am using a pic18f4523 and using it to print to a panel printer via serial the serial port and a ST202RCN rs232 driver at 9600 baud. When I initially switch the unit the printer starts up printing gobbylygook. Does anyone have any suggestions on how to overcome this.

    many thanks in advance John

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by J_norrie View Post
    Hi there, I am using a pic18f4523 and using it to print to a panel printer via serial the serial port and a ST202RCN rs232 driver at 9600 baud. When I initially switch the unit the printer starts up printing gobbylygook. Does anyone have any suggestions on how to overcome this.

    many thanks in advance John
    What kind of printer?

  3. #3
    Join Date
    Jun 2006
    Location
    Glasgow, Scotland
    Posts
    26


    Did you find this post helpful? Yes | No

    Default Ap1200 Printer

    Hi I have found that if I power up the PIC ten send data to the printer and then switch on the printer then everything from then on is fine. I was actually trying tio clear the pic serial output buffer at power up. Is this possible?

    kind regards and many thanks John

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by J_norrie View Post
    Hi I have found that if I power up the PIC ten send data to the printer and then switch on the printer then everything from then on is fine. I was actually trying tio clear the pic serial output buffer at power up. Is this possible?

    kind regards and many thanks John
    disable then reenable the serial port on the PIC itself.

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


    Did you find this post helpful? Yes | No

    Default

    almost sure you're using SEROUT right?
    Steve

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

  6. #6
    Join Date
    Jun 2006
    Location
    Glasgow, Scotland
    Posts
    26


    Did you find this post helpful? Yes | No

    Default AP1200 serial printer

    hi again yes i am using serial out as follows
    printoutB:
    gosub GetBin
    gosub year10
    SEROUT PortC.6,T9600,[printit,"k =",#peak,"0 ftlbs",13,10]

    pause 100: return

    any suggestions please
    thanks again john

Similar Threads

  1. PIC16F88 HSERIN to LCD Problem
    By robbrownuk in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 6th June 2009, 22:32
  2. EDE702 where?
    By karenhornby in forum General
    Replies: 18
    Last Post: - 16th June 2008, 22:04
  3. Student Project
    By aggie in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 8th July 2006, 08:56
  4. USB Interface using PIC
    By Tissy in forum mel PIC BASIC Pro
    Replies: 21
    Last Post: - 22nd May 2006, 16:04
  5. Serial Comms Buffer?
    By koossa in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 2nd December 2005, 01:29

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