Back-slash "\" error in pbp


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2004
    Location
    Santa Clara Calif. USA Silicon Valley
    Posts
    6

    Question Back-slash "\" error in pbp

    I'm trying to use the back-slash "\" with the "REP" "rep c\n" and the "STR ArrayVar \n" modifier funtion with Serout2. I'm using a 16F876A, pbp2.45 with MPLAB 6.5. The back-slash comes up in red when I type it into my bas. file. The pbp manual and many posts here show it's use. I'm missing something. Syntax? A define statement? INC. file modification? New glasses?

    Example:
    SEROUT2 SROUT,1,[REP "Z"\4,CRG,LF] 'SEND 4X LETTER "Z"

    In the pbp manual I see these modifiers only in Serin2 and Serout2 and others but not in Serin and Serout. I see it used with Serin & Serout in posts though.

    I am communicating with Microcode Serial Communications window. All other communications work though I have not tried other modifiers yet.

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


    Did you find this post helpful? Yes | No

    Cool

    are you saying that the example you send do not work?!?

    Color are color... red in MPLAB do not always refer to error...

    write this working line

    shiftout mosi,sclk,0,[%0010000000000000\16]

    all the number will be in red... but it's working, kind of color attribute.
    Steve

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

  3. #3
    Join Date
    Aug 2004
    Location
    Santa Clara Calif. USA Silicon Valley
    Posts
    6


    Did you find this post helpful? Yes | No

    Talking

    Thanks mister e. You got me thinking.
    Your right. The red "\ " doesn't mean anything. It works!
    My problem I found was that my Serout2 line was incorrect.
    from the start.

    Instead of:
    Serout2 SOUT,1,[REP "Z"\4,CRG,LF]

    Serout2 SOUT,813,[REP"Z"\4,CRG,LF] WORKS FINE!

    I'm new to Serout2 use so rewriting the baud rate to 813 got all my Serout2 lines to work. And of course the REP function works now.

    I've go to stop those late late night programming sessions.

Similar Threads

  1. PBP Book
    By Bruce in forum Off Topic
    Replies: 83
    Last Post: - 4th October 2021, 12:55
  2. Compiler differences between PBP 2.33 & 2.46
    By nikopolis in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd May 2006, 19:01
  3. Newby- PBP wont compile for 18F (MPLAB)
    By jd76duke in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th December 2005, 23:30

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