How to use TRIS on a ICD programs


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2009
    Posts
    33

    Default How to use TRIS on a ICD programs

    Hi, I am a newbie on this forum and first of anything I want to thank you and said hello to everybody out there.
    As a beginner I am using PicBasic Pro, MicroCode Studio a serial programmer TE-20 and a Lab-x3 board for ICD learning. I think the In-Circuit Debugger is a must for a person that wants to know the PIC programming in depth. I have ran the first few model programs for my 16F628 pic and now I am getting into more complex programming. I am using the same pic on my new project that uses the first four pins of the port A as inputs and also the last four pins of port B as outputs. So what I do first on the program is load TRISA with $0F and TRISB with $0F so I let free the RB1 [RX] and RB2[TX] to be use by the ICD program for the MAX232 communication ability. When I compile, write and run the program for ICD the instructions are stopped as soon as the two lines “TRIS” are read. If I take out these two lines and compile it again there is no problem running the program but of cause it does not do what it should. I have looked everywhere for how to use these TRIS command on programs that run as ICD with no luck. Please, help me. Thanks.

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Try using ...

    TRISB = $0B

    or

    TRISB = %00001011
    <br>
    DT

  3. #3
    Join Date
    Aug 2009
    Posts
    33


    Did you find this post helpful? Yes | No

    Default Thanks.

    Thank you, but what about TRISA ?

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Do whatever you need to with TRISA.

    I just figured that since MicroCode Studio uses the USART for communications...

    Setting RB2[TX] to INPUT, would probably stop communications with the ICD.
    <br>
    DT

  5. #5
    Join Date
    Aug 2009
    Posts
    33


    Did you find this post helpful? Yes | No

    Default Is working

    Thanks, you are right is working now. Thank you.

Similar Threads

  1. ICD, ICSP and Picbasic Pro
    By mwhatley in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 8th August 2024, 20:42
  2. DT Interupts and ICD?
    By ShaneMichael in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 14th November 2009, 02:02
  3. ICD use with MCS Plus, PBPro & PicKit2??
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 30th September 2009, 23:06
  4. ICD Woes
    By spad13m in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 14th February 2008, 05:56
  5. Another MSCP ICD question
    By keithdoxey in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 31st July 2006, 00:07

Members who have read this thread : 0

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