Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PICC18 how to use puts function

Status
Not open for further replies.

mike2002

Member level 2
Joined
Sep 16, 2002
Messages
47
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
c/c++ programming
Activity points
328
PICC18

Do anybody know how to use "puts" function for serial port.
I got working putch(), getch() - but not puts(). Looks like skiping over string. I used sources provided with PICC18 but not succesfull.
printf() works fuzzy - outputs caracters zig-zag over the terminal screen.
Chip in use - PIC18F2320
Can anybody help???
:(
 

Picc18

Without seeing your code can't tell much except make sure your baud rate and stop bits, data bits and handshaking are all set according to your code.
Are u using a max232 type chip to interface? If not you need to set your polarity correctly, ie invert or true according to your hardware.
I use this software for the serial port it's very good: https://bray.velenje.cx/avr/terminal/

Best regards....SAR
 

A question, when using printf, did you remember to include the new-line
character (\n) in the end of each line, if you didn't that could explain the zig-zag output you mentioned.

puts() should just take one zero terminated string as parameter, and use
putch() to output each char. puts() replace the string termination \0 with a \n.

/Froggy
 

PICC18 /puts/printf

I did everything what Froggy suggest but still problem.
Froggy, Could you post piece of code of how you did?
Even if I put in printf("....\n"); - desn't go to the new line.
Is it necessary special treatment of flash strings???
Thanks
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top