PicBasicPro+MicroCode studio plus and ICD debugging


Closed Thread
Results 1 to 13 of 13
  1. #1
    Join Date
    May 2008
    Posts
    19

    Default PicBasicPro+MicroCode studio plus and ICD debugging

    Hi!

    I'm trying to use icd debugging with MCSP on a pic16f628. I program pic with MELAB U2 and I use Picbasicpro.I did build the microcode RS232 serial to PC. And can't get it to work.
    Here is the simple code:

    ' Example program from manual to blink an LED connected to PORTB.0 about once a second

    DEFINE LOADER_USED 1
    DEFINE OSC 4

    loop: High 0 ' Turn on LED connected to PORTB.0
    Pause 500 ' Delay for .5 seconds

    Low 0 ' Turn off LED connected to PORTB.0
    Pause 500 ' Delay for .5 seconds

    Goto loop ' Go back to loop and blink LED forever
    ' x = 10

    End

    Communication timeout error.....can't connect to PIC
    Some files are attached....tanks for your help
    it's basic for you guys...I realy wann'a learn this....
    Attached Images Attached Images     

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    You can get rid of the DEFINE LOADER_USED 1. This one can't use a bootloader.

    Are you clicking the ICD Compile/Program button before programming your 628?

    Have you verified your serial connection?
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  3. #3
    Join Date
    May 2008
    Posts
    19


    Did you find this post helpful? Yes | No

    Default ICD compile

    Hi Bruce,

    Ok, I'll get rid of it...

    DEFINE LOADER_USED 1... I tried it without.

    Connections on the PC or the max232?

    On my laptop I got USB to DB9 connector...worked 2 minutes
    and I did get too PCMCIA to rs232...with Vista

    Connection from max232 to DB9 male seems allright

    Be patient with me I new with this...tanks again...

  4. #4
    Join Date
    May 2008
    Posts
    19


    Did you find this post helpful? Yes | No

    Default File Microcode.jpg from first post

    To be sure...on that drawing from microcode...that DB9 shematic is female configuration...is it?

    If so...I used a male and pins are upside down

    Michel

  5. #5
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Before you can get ICD working you need to make sure you have a good serial connection.
    If you can send/receive serial data between the PIC & PC it should work fine with the ICD.

    If not, then you'll need to fix that first.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  6. #6
    Join Date
    May 2008
    Posts
    19


    Did you find this post helpful? Yes | No

    Smile Serial connection

    Connection are good on serial!


    I can get the 628 to blink led without connecting to max232 with that code....

    ' Example program to blink an LED connected to PORTA.0 about
    ' once a second
    'DEFINE LOADER_USED 1
    'DEFINE OSC 4
    trisA.0 = 0


    x var byte
    led var porta.0


    loop:
    x=1 ' Turn on LED connected to PORTB.0
    led=x
    Pause 500 ' Delay for .5 seconds

    x=0 ' Turn on LED connected to PORTB.0
    led=x ' Turn off LED connected to PORTB.0
    Pause 500 ' Delay for .5 seconds

    Goto loop ' Go back to loop and blink LED forever
    End

    To get RX and TX working on 628 should i put line in code to get it to send and receive or ICD complile does it for me....

  7. #7
    Join Date
    May 2008
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Microcode studio plus

    I do select the right COM to run program....witch is COM9 for me....is a PCMCIA card to RS232.

  8. #8
    Join Date
    May 2008
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Desktop image of MicroCode ERROR

    Desktop image of MicroCode ERROR
    Attached Images Attached Images  

  9. #9
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by michel View Post
    Desktop image of MicroCode ERROR
    Looks to me like the fix for your problem is right there in the error message...

  10. #10
    Join Date
    May 2008
    Posts
    19


    Did you find this post helpful? Yes | No

    Unhappy I did try It!

    Bruce told me that I don't need DEFINE LOADER_USED 1. I have tried it with it an doesn't work.

    Is the led supposse to blink when programmed with ICD complile and program?

    Tanks again...

  11. #11
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Bruce told me that I don't need DEFINE LOADER_USED 1. I have tried it with it an doesn't work.
    DEFINE LOADER_USED 1 is only needed when using a boot-loader.

    Is the led supposse to blink when programmed with ICD complile and program?
    No. It should only blink when you are running ICD.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  12. #12
    Join Date
    May 2008
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Breadboard is working

    Hi Bruce!

    I finally got it.....on the breadboard....it's a beginning

    What was wrong:

    On the shematic from Microcode studio plus, took off the link from (db9, pin4) to (max232, pin 8); (max232, pin 9) to resistor 100 Ohms.

    Here is the code:

    DEFINE OSC 4
    trisA.0 = 0


    x var byte
    led var porta.0

    ENABLE DEBUG

    loop:
    x=1 ' Turn on LED connected to PORTA.0
    led=x
    Pause 500 ' Delay for .5 seconds

    x=0 ' Turn on LED connected to PORTA.0
    led=x ' Turn off LED connected to PORTA.0
    Pause 500 ' Delay for .5 seconds

    Goto loop ' Go back to loop and blink LED forever

    DISABLE DEBUG

    End

    NOW I HAVE TO FIGURE OUT THE PCB....

    The 628 transmit only 20 seconds after the power is turned on....
    Attached here is the pcb layout....

    Tanks again Bruce!
    Attached Images Attached Images  

  13. #13
    Join Date
    May 2008
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Welded PCB

    Hi!

    From my pCb attach to the post above....can't find anthing wrong.

    But I get some small voltage on pins than are suppose to be zero...like 0.2 and .3 V...

    And TX doesn't transmit....

    Question: Could it be from melted welding paste left on the board...it's so tight in between pins and nets. Does current goes throught that paste. Don't get reading from Ohmeter.

    Tank you...

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts