Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

debugging

Status
Not open for further replies.

TKS

New Member
does know anyone a debug tool or hardware testboard soo you can see what's hapening in the chip whit your program...???

i'm a realy really beginner..

and i was always using visual basic 6.0 and that debug future is soww handy..i was looking for some simular function but then for the pics..


in school we program PLC from siemens then you also can connect your desktop to the plc and run together whit the plc..

oin you screen of your pc then you can see for what signals the plc is waiting or which he recieves..ver handy when debugging..

i was looking for something but then for pics..


TKS
 
if you use MPLab you can simulate your code. You can keep an eye on the SFRs and stimulate inputs...
 
wgats

SFRs what is dat??

if it are rigisters what kind are it..??? status..??

and how can i simulate whit out the programmer..??

use winxp is that problem..??

TKS
 
Re: wgats

TKS said:
SFRs what is dat??

if it are rigisters what kind are it..??? status..??

and how can i simulate whit out the programmer..??

use winxp is that problem..??

TKS

SFR's are Special Function Registers used to control perhepials in the pic. For example if you want to read/write to a pic's internal EEPROM you use EECON1, EECON2 ,... (see datasheet of a pic with EE). These are SFR's, there are, of course, much more...

Download MPLAB IDE from the microchip site, it allows you to step trough your code and see what happens on your pc in simulation.
 
Sorry, I wasn't clear enough.

As Exo says get the IDE and have a play. It is packed and has loads of features that I don't even use.

Here is a list of what I do use:

  • Special function register view - to see how the registers are affected by my code.
  • Port Stimulus - this is a feature where you can simulate inputs to the PIC
  • Watch - allows you to keep an eye on variables and regisers in a multitude of formats
  • coding & compiler - use this to actually do the coding and compile using MPAsm (inbult)

Of course if you purchase a MPLab programmer you get a whole lot more to play with...

You can also get a simple JDM programmer that uses ICProg by clicking on the image below. I'm currently sellinig this PCB on eBay:

**broken link removed**

It is based on this schem:

**broken link removed**

Hope this helps.
 
programmer

well i have already a picall programmer

and that one works good..

but i need to be able to step by step go in the code..

or to use a basic to asm compiler because of the minor fault i make then

( i make less faults in basic..)

tks
 
Exo, I own and run PCBIdeas.com - yes I accept Eagle. www.pcbideas.com for pricing. but I can give you a small discount.
 
....

Well i just installed the IDE again now accepting the usb ****..

and now it works..

but its asking full power out of my p4 2.4Ghz and i dunno wy..???

have got 512Mb ram and XP prof..

TKS
 
what do you mean with 'full power'?

Do you mean simulations run kinda slow? thats normal, requires a lot of cpu work simulating
 
For debugging you could get a "monitor" program. A monitor is a section of code that you include with your application that can halt your program and send out all the memory and register values. Its fairly intrusive but it will let you see the state of your program.

You could also try to find a processor with a JTAG debug port which will let you do the same thing without any extra code.

About the CPU usage problem: there are some programs that just arn't that well written that will use 100% CPU time even when they arn't doing anything. Simulating an 8 bit processor shouldn't take that much CPU Time.

Brent
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top