ICD, ICSP and Picbasic Pro
I'm a bit confused about using the ICD feature of the PICs that support ICD. I have managed for years using the serial DEBUG command to work out my bugs but have recently become interested in the ICD feature. A project I just completed used a 16F628 and while I still had it on the protoboard I thought I would see if I could get the ICD to work. I already had a MAX232 converter set up so it was a simple matter to give it a try. I am using MicroCode Studio and PicBasic Pro with a Warp13 programmer (I was not using ICSP). Using Bruce Reynolds' posting on his site I was able to get a simple program to work but when I tried it on a "real" program it would hang and stop running. In Bruce's circuit he uses the RX/TX pins on the '628 but I see that Microchip's AN DS51242A says that the ICD uses RB6 and RB7. I have also found reference to adding a NOP as the first executable instruction and also adding an INCLUDE ICDDEFS.BAS. My copy of PBP has several variations of this include file, none of which say they are for the '628.
From what I can gather the Microchip ICD2 can connect to the ICSP pins and act as a programmer and then as a debugger, I assume using MPLAB. So my question is this:
Will the ICD2 work with Microcode Studio and PicBasic Pro and provide programming and debugging functions?
Is there something better than the ICD2 ?
Many thanks,
Mark
Why do I get a compilation error ???
Hi All,
Havent used the ICD feature before but this thread has made me take a closer look at it.
I decided that my current project will benefit from this as I currently have loads of code stuffed in there to try and debug what is happening but have realised that if I use ICD then I dont need it.
The problem I have is with this section of code
For CharCount = 0 to NameCount
Hserout [Name[CharCount]]
Next CharCount
Hserout [10]
Hserout ["IP: ",DEC IP[0],".", DEC IP[1],".", DEC IP[2],".", DEC IP[3],10] 'Display IP Address
The two lines in bold fail with the message "Bad Expression" but ONLY when I compile with ICD (CTRL+F9).
If I compile normally (F9) then it compiles without errors!!
Any ideas ?
Thanks
Re: ICD, ICSP and Picbasic Pro
Quote:
Originally Posted by
keithdoxey
...It would appear that it is only a problem with Hserout because that command requires square brackets as part of its syntax.
Just tried Hserin with the line Hserin [Name[Namecount]] and that compiles fine with [] or () around the array element....
(old thread, but hey, information is information)
I wouldn't be surprised if it had to do with this:
https://www.picbasic.co.uk/forum/sho...?p=909#post909
When in doubt, rummage through Melanie's and Darryl's old posts. They've discussed all sorts of obscure stuff over the eons.