View previous topic :: View next topic |
Author |
Message |
NickGama
Joined: 23 Mar 2019 Posts: 3
|
CCS Serial Input/Output Monitor |
Posted: Wed Mar 27, 2019 1:20 pm |
|
|
How do you get CCS Serial Input/Output Monitor working?. Do we need to set it?
I have connected ICD-U64 in USB Port 3. Also selected Serial monitor to USB to port 3. Tried all the baud rates. _________________ NickGama |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
jeremiah
Joined: 20 Jul 2010 Posts: 1349
|
|
Posted: Wed Mar 27, 2019 10:12 pm |
|
|
If you are wanting to use the SW serial port through the ICD-U64, you need to do a couple of things in your code:
If you aren't using the default programming pins (programming port 1 pins), then you have to specify which port you are connected to. This isn't needed to program the PIC, but is needed for the SIOW integration
Code: |
#device ICSP=2 //using PGD2 and PGC2
|
If you are using the pins from programming port1, you don't have to specify the ICSP setting.
you then need to setup the correct #use rs232 for it:
Code: |
#use rs232(ICD,DISABLE_INTS,stream=ICD_STREAM)
|
The stream parameter is optional if you don't use any other serial ports. ICD_STREAM is just a stream name that I picked randomly. The required parts are
Code: |
#use rs232(ICD,DISABLE_INTS)
|
Once you program the PIC and run the program, SIOW will auto load. It also will load if you do Run Target from CCSload. |
|
|
allenhuffman
Joined: 17 Jun 2019 Posts: 552 Location: Des Moines, Iowa, USA
|
|
Posted: Fri Jan 03, 2020 9:41 am |
|
|
Should SIOW work when you didn't just LOAD the program? Like, if I have firmware loaded with ICD printf output enabled, and I run SIOW and turn on the board (with debugger connected, of course), should I be able to get I/O?
I've seen it work sometimes, but usually it doesn't. It "always" (except when it doesn't) works when I do a fresh LOAD. _________________ Allen C. Huffman, Sub-Etha Software (est. 1990) http://www.subethasoftware.com
Embedded C, Arduino, MSP430, ESP8266/32, BASIC Stamp and PIC24 programmer.
http://www.whywouldyouwanttodothat.com ? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19520
|
|
Posted: Fri Jan 03, 2020 2:40 pm |
|
|
It remembers the last serial port used. So whether it'll just work, will
depend on this port still being available.
Unfortunately, Windows habitually maps USB serial ports to different
COM port numbers when they are re-attached. Some units have an
internal serial number in the USB, and on these you can physically set
the unit to always produce the same COM port, but most cheaper units
will give more or less random port numbers..... |
|
|
jeremiah
Joined: 20 Jul 2010 Posts: 1349
|
|
Posted: Sat Jan 04, 2020 1:16 pm |
|
|
allenhuffman wrote: | Should SIOW work when you didn't just LOAD the program? Like, if I have firmware loaded with ICD printf output enabled, and I run SIOW and turn on the board (with debugger connected, of course), should I be able to get I/O?
I've seen it work sometimes, but usually it doesn't. It "always" (except when it doesn't) works when I do a fresh LOAD. |
When I do it at work, I can get it to run 1 of 2 ways:
1. Reprogram it from the PCWHD IDE program button (but this feels like overkill)
2. In CCSLoad, I just use the Stop/Run button and it correctly runs SIOW
Caveat to the above: SIOW is a poorly written program. It easily locks up (at least for me). If I don't close it properly the above won't always work. It seems very finicky so I always try and close it the same way which gives me reproducible and good results. |
|
|
|