PDA

View Full Version : PBP,MicroCode ICD and EasyPIC4



exelanoz
- 1st October 2007, 10:50
Hello to all,

I have the EasyPIC4 Development board and I have built quite a few projects on it with PBP2.47
I also use MicroCODE studio Plus, and I have updated to the latest version 3.0.0.5
I never used ICD and wanted to try, but for unknown reason the MicroCODE Studio ICD works quite erratically. You have to try and connect at least 10-15 times before
it connects, then it hangs...

For most projects I use a 16F877A or the 876A. To test it, I made a simple 2 LED blinky program to try.
As the user manual states, it is important with the Defines for oscillator ...(I tried 4(XT) and also 20(HS))

It sometimes connects and plays through the code sequence, but after 1min it freezes...

So I tried the following...

1)Buy shorter serial cable 1 metre
2)Configure serial port from 19200 to 9600baud in Control Panel 8-N-1 (No flow control)
3)I changed motherboard serial port COM1 to PCI serial port card COM3 and COM4 (I use it for my plotter)
4)I checked all jumpers on my DEV board Serial is on RC7 (RX) and RC6 (TX)
5)I read Mister_E comments on pressing the reset button on board before connecting.
6)I also used TRISC to make input and output pins for serial...

The COM ports all work well and are true RS232 levels...

Hmmm, I am lost. Any suggestions?

Acetronics2
- 1st October 2007, 12:42
..

Hmmm, I am lost. Any suggestions?



Of course one !!!

Did you contact Mikro Elektronica ???

Their Forum : http://www.mikroe.com/forum/

Alain

exelanoz
- 1st October 2007, 12:58
Of course one !!!

Did you contact Mikro Elektronica ???

Their Forum : http://www.mikroe.com/forum/

Alain

Bonjour Alain,

Yes!!! I agree, good suggestion....but....mikroelektronica cannot help me with PBP and microcode studio....I just use their board. I don't have any mikroelektronika compilers...

Acetronics2
- 1st October 2007, 13:20
Hi,

But ...

I'm not sure the Easy Pic boards are "something else than MKB" compatible. Especially for ICD ...

I think "DJ Kiwi" alias Mr E has used this board ... may be he knows much more about it than me !!!

Alain

mister_e
- 1st October 2007, 16:44
As far as i'm aware of... the on-board ICD run only with their own Compiler and IDE. :(

Maybe i missed something thought. If i find something i'll post it here.

MicroCode ICD worked well for me... well for the really few times i used it. Did you tried to use ENABLE DEBUG and DISABLE DEBUG 'round the code section you want to debug?

If you're using any Interrupts, the ICD may react weird indeed. Hence why i would suggest you to use ENABLE DEBUG and DISABLE DEBUG only around the code section you want to look at.

As i said, i didn't use it really often.

mister_e
- 1st October 2007, 23:03
but... mmm did you also modified your board as i suggested (http://www.picbasic.co.uk/forum/showpost.php?p=33099&postcount=21) ?

Not sure if this could be one part of the problem...

exelanoz
- 2nd October 2007, 10:04
Hello Hello Mister_E,

Yes, I did read your post on that too, but no, I haven't modified the board yet, but I don't think that is the problem. It means I must press the RESET button before I used the ICD.

I have some positive results this morning when I wake up...in WIN XP control panel | system | hardware | Com Ports, - I slowed down my COM1 to 4800bps baud (8-N-1) No flow control.

Seems to connect everytime, but slow and *sometimes* freezes.
I use a simple test program like:




DEFINE OSC 4

Main:

HIGH PORTB.0
PAUSE 500
LOW PORTB.0
PAUSE 500
HIGH PORTB.1
PAUSE 500
LOW PORTB.1
PAUSE 500

GOTO Main

END



Hihihihihi......I don't think I need to use the ENABLE DEBUG and DISABLE DEBUG for a simple program! :-)))))

I will check the XTAL, I have some really cheap ones.

Possibly my older DELL computer is dying and needs a really big hammer or drop it off a tall building :-)))

I try some other things and then I give up...

I don't really need ICD, but just wanted to try it.

exelanoz
- 3rd October 2007, 12:04
Hello Mister_E

Many thanks for you reply....I lost much hair over this problem, but it is FIXED!

I'm so stupid...

Ok here goes...after getting a BIG BIG hammer ready for my computer...I try one more thing.

My wall plug (errr....americans call it wall wart?) you know what I am talking about, - so it was a switchmode 2A 12V. I put it on my scope and it was really noisy, the crystal was also drifiting quite a bit.
Soo.......I replaced the plug pack with a nice linear 500mA 12V and replaced the crystal with a nice stable 4Mhz and then viola...it works...ICD on serial port and MicroCode is super happy and back to 2m Serial Cable!

Hmmm...I had some 'other' hair loosing problems on my board before. Somehow I think it was caused by the switchmode supply. No more switchmode for me...:-)

I am surprised the PIC still runs really well, even with a switchmode, but looks like other stuff don't like it.

mister_e
- 3rd October 2007, 14:45
That's a bit weird at the same time because it has this Voltage regulator in between. Maybe i'm missing something here, maybe it miss one capacitor or two here and there on the board to filter some high frequency noise coming from your Switching psu.. One thing i can say, is that i added a 10uF tantalum on each DIP socket too.

You could still use a AC psu, as this board have it's own diode bridge.
Oh well, at least it works :D