CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

console?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
s_mack



Joined: 04 Jun 2009
Posts: 107

View user's profile Send private message

console?
PostPosted: Fri Aug 28, 2009 10:21 am     Reply with quote

I have MPLAB IDE and this CCS as a plugin. So I hit "build all" and it does its thing, so I really only see a CCS window for half a second and that's it.

Is there a simple way of getting a console window so I can test my script logic on screen?

Right now I have to build the files, program the device, take the device to the field and test to see if it works. Since there's no textual output in any of this, I then have to guess why it didn't work and try again. That's been fine up until now, but I have an algorithm that works perfectly in my excel simulation and not at all in the field. I want to see the mathematical calculations as they happen to see what might be going wrong.

I know I can get a generic c+ compiler but because every compiler is different I'd rather do it in ccs.

This program was installed on this computer before I got here and I can't seem to find a console so I wonder if its a plug-in only?

Thanks.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Aug 28, 2009 10:46 am     Reply with quote

See this post for instructions on how to use the "UART1" feature of the
MPLAB simulator to display serial output in the MPLAB Output Window:
http://www.ccsinfo.com/forum/viewtopic.php?t=23408&start=1
s_mack



Joined: 04 Jun 2009
Posts: 107

View user's profile Send private message

PostPosted: Fri Aug 28, 2009 11:56 am     Reply with quote

Thanks.

I couldn't get it to work. It compiled fine and "run" worked... but no output as described in that thread.

Maybe because I'm using pic18 and the tutorial is based on a pic16? I don't know.

I can't imagine why MPLAB doesn't have a basic console type output.


This is proving extraordinarily confusing for something that should be simple.
s_mack



Joined: 04 Jun 2009
Posts: 107

View user's profile Send private message

PostPosted: Fri Aug 28, 2009 12:02 pm     Reply with quote

nevermind (for now Very Happy )

Using an example file in the help got me on the right track.

#use rs232(uart1, baud=9600)

instead of

#use rs232(baud=9600, xmit=PIN_B2, rcv=PIN_B1, ERRORS)

from the tutorial.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Aug 28, 2009 12:13 pm     Reply with quote

The "Uart1" feature of the MPLAB simulator requires that the hardware
UART in the PIC be used for output. It won't work with a software UART.
The pins for the hardware UART vary, depending upon which PIC you are
using. If you specify "UART1" in the #use rs232 statement, CCS
generates code for the hardware UART. (Or, for the first hardware UART
in a PIC that has two of them).

"Uart1" as a term used by MPLAB is just coincidentally the same term
as used by CCS in their #use rs232() statement. The MPLAB term
refers to a feature of its simulator. The CCS term is a shortcut for
the hardware UART pins, so you don't have to look-up the correct pin
numbers. The compiler does it for you.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group