Re: [piclist] Re: IDE Debug


Apr 25, 2003

 


----------------------------

#1026 Apr 25, 2003

Hey to all, a couple of quick questions . . .



a) how comprehensive is the IDE debugger? Is it worth getting to

know, or is it just as easy to debug by swapping the chip between the

programmer and the circuit? I'm scratching my head over some code

and I'm thinking this might shine a light on some things. Yeah or

neigh? It is standard in the IDE package, right?



b)Is the IDE manual worth printing out? I scanned a few pages of it,

and have printed the mid-range and device manuals, but am not sure if

I really want to tie up the office printer for 280 pages if it is

destine to sit on the shelf.



Thanks . . . John Remington.



----------------------------

#1027 Apr 25, 2003

Listers,



I recently spent 2 hours downloading the latest MPLAB 6.20, so that I had my

system set up for all the latest devices.



Despite my ISP cutting me off mid-download, I eventually got all 25MB !!

onto my hard-drive.



I was somewhat disappointed to find that the IDE 2 offered no support for

the "older" 16FXXX devices, such as the F84 and the 16F628. It did not

offer even a simple "program device" option, which I think would have been

most useful for those of us who do not always want to use the latest 18FXXXX

devices, or occasionally need to return to the smaller parts.



If anyone has other information to the contrary - please let me know. Good

job I still have my PICStart Plus at hand.





regards,





Ken



----------------------------

#1029 Apr 25, 2003

John,



There are other simulators around - I downloaded one from Yugoslavia

and it seems quite nice. But here's the deal: the IDE simulator

doesn't seem to support symbolic break points and this is a problem

because it is difficult to get to the point in the program where you

want to begin single stepping. The simulator does provide for a

Watch screen based on symbolic addresses including the all important

WREG.



So, what to do? Create the difficult code in a subroutine. Write a

quick test program to set up the input conditions and trace the

result. Almost every subroutine has a certain amount of input and

generally a limited amount of output.



Take the example of converting a hex digit in W to an ASCII character

with the result in W:



CBLOCK 0x20

AsciiTemp: 1

ENDC



ASCII:

andlw...0x0F

movwf...AsciiTemp

sublw...9

movlw...'0'

btfss...STATUS,C

movlw...'A'-10

addwf...AsciiTemp

return



Now write a test macro:



Test MACRO Value

.....movlw Value

.....call..ASCII

.....ENDM



Now invoke it for all legal values:



....Test...0

....Test...1

....

....Test...0x0A

....

....Test...0x0F



Because ASCII is a subroutine you can use the F8 key to skip over the

code inside the subroutine and just look at the result. So, with the

Watch and source windows open you can quickly check the input and

output.



Once it performs properly copy it back to your main program. Or

#include it. You can carry this out indefinitely so that your entire

main program #includes a bunch of separately testable routines.



The IDE debugger isn't the best around - not even close but since

most of the problems are in small pieces of code, it will do the job.



The programmer issue: doing ISP is ok if your hardware and chip

programmer will get it done. Swapping the chip in and out is a waste

of time. I really suggest using a chip with a bunch of program

memory and a USART. Then you can do debugging by writing messages to

the PC terminal. I know I have written it before but here I go

again: consider using a 16F87x and, in particular, the 16F877 from

www.junun.org on a prototype board from www.melabs.com. The chip

will cost $8 and has a built in boot loader. The BotLoader program

is available at junun and you are nearly ready to go. Just get a

Maxim MAX233 to convert between TTL and RS232 and you are ready to

start. Or, use one of the dongles available everywhere. Look at the

Mark III schematic at junun for connection details. The source for

the boot loader is also available and could be converted to other

devices.



I like being able to dump values to the screen - it just makes the

process go faster. I have not printed the IDE manual - don't think I

need it.



Good luck!



--- In piclist@yahoogroups.com, "jrem123" jrem123@y...> wrote:

> Hey to all, a couple of quick questions . . .

>

> a) how comprehensive is the IDE debugger? Is it worth getting to

> know, or is it just as easy to debug by swapping the chip between

the

> programmer and the circuit? I'm scratching my head over some code

> and I'm thinking this might shine a light on some things. Yeah or

> neigh? It is standard in the IDE package, right?

>

> b)Is the IDE manual worth printing out? I scanned a few pages of

it,

> and have printed the mid-range and device manuals, but am not sure

if

> I really want to tie up the office printer for 280 pages if it is

> destine to sit on the shelf.

>

> Thanks . . . John Remington.







----------------------------

#1030 Apr 25, 2003

I am really reluctant to weigh in on this one but, as I use 6.20

every day for 16F628, 16F876 and 16F877 I wonder if I understand your

question.



Once you create a Project, you need to select the appropriate device

under the Configure menu. This selection must agree with any

selection done in the code. There are a bunch of devices to choose

from.



Now, if there is an issue of chip programming via the IDE I wouldn't

be any help. I use a Warp13a and an external driver. However,

www.newfoundelectronics.com has documentation on tying this

programmer to the IDE. I just haven't bothered to do it.



Any chance I answered the right question?



--- In piclist@yahoogroups.com, "Ken Boak" kenboak@s...> wrote:

> Listers,

>

> I recently spent 2 hours downloading the latest MPLAB 6.20, so that

I had my

> system set up for all the latest devices.

>

> Despite my ISP cutting me off mid-download, I eventually got all

25MB !!

> onto my hard-drive.

>

> I was somewhat disappointed to find that the IDE 2 offered no

support for

> the "older" 16FXXX devices, such as the F84 and the 16F628. It

did not

> offer even a simple "program device" option, which I think would

have been

> most useful for those of us who do not always want to use the

latest 18FXXXX

> devices, or occasionally need to return to the smaller parts.

>

> If anyone has other information to the contrary - please let me

know. Good

> job I still have my PICStart Plus at hand.

>

>

> regards,

>

>

> Ken



----------------------------

#1031 Apr 25, 2003

rtsofer,



I thought that the IDE 2 was going to replace the PicStart Plus, as a device

programmer. It has all the capability of setting Vpp and sending serial

data to a flash based PIC to programme it. However, Microchip have chosen

not to support programming of the F628 with the IDE 2.



Sure, 6.20 can compile assembly code, and step through code using MPSIM, but

you have to revert back to the old serial port driven programmer ifyou want

to program the smaller chips.



Well that's progress for you.





Ken


S
e
n
i
o
r
T
u
b
e
.
o
r
g