Pulsin and ICD


Closed Thread
Results 1 to 4 of 4

Thread: Pulsin and ICD

  1. #1
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322

    Default Pulsin and ICD

    Hi All!
    Again I have the infamous IDC timeout. I believe the wiring is correct and just in case , maybe I missed something in the code? Thanks, Ed

    '************************************************* ***************
    '* Name : SERVO ANGLE.BAS *
    '* Author : Ed Cannady *
    '* Notice : Copyright (c) 2012 Copyright (c) 2012 *
    '* : All Rights Reserved *
    '* Date : 5/20/2012 *
    '* Version : 1.0 *
    '* Notes :16F628A *
    '* : *
    '************************************************* ***************
    Include "Modedefs.bas"
    Define LOADER_USED 1

    ' ** Set Xtal Value in mHz **

    Define OSC 20 ' Set Xtal Frequency

    ' ** Declare Pins Used **

    CMCON=7
    INPUT PortA.0 ' Data is clocked on rising edge of this pin

    ' ** Variables **
    Rawpulse Var Word ' Measured input pulse width
    Trueangle Var Word ' Calculated Servo Angle

    ' ***** MAIN PROGRAM *****

    Again:
    Pulsin PORTA.0,1,Rawpulse ' Measure the input pulse width on pin 17 (RA0)
    Trueangle=(((Rawpulse-15)*18)*100) ' Calculate Servo position angle
    pause 150

    goto Again

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521


    Did you find this post helpful? Yes | No

    Default Re: Pulsin and ICD

    Hi Ed,
    I suspect you mean the MicroCodeStudio ICD?
    Do you have the MAX232 circuit as per the description, do you have the correct chip selected in the drop down list and have you programmed the chip with the .hex file compiled FOR ICD operation (by clicking the ICD compile button, not the normal Compile button)?

    Are you bootloading the PIC? If so, and if THAT works, then the MAX232 circuit and hardware is verified to be OK.

    /Henrik.

  3. #3
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: Pulsin and ICD

    Hi Henrik!
    There is just something very basic I seem to be missing somewhere. Yes, the MAX232 circuit is good and has been working for a very long time. I can go into Microcode Studios, open the comm screen, jumper the Rx to the Tx on the MAX232 output, connect, type something in and it returns! Yes I have been using the ICD compile. I just wish the IDC error message was more exact! Best, Ed

  4. #4
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: Pulsin and ICD

    Bad resonator!

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