PDA

View Full Version : Back-slash "\" error in pbp



Blind Al
- 1st January 2005, 07:58
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.

mister_e
- 1st January 2005, 10:46
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.

Blind Al
- 2nd January 2005, 02:06
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.