Search Results - MEL PICBASIC Forum


Search:

Type: Posts; User: Tabsoft; Keyword(s):

Search: Search took 0.00 seconds.

  1. Replies
    71
    Views
    32,938

    Re: Beginner in need of help !!

    Rob,
    You really don't state what the problem is, only that you see a problem.

    A quick scan of the code leads to too many questions for me.
    What are you trying to accomplish in the different...
  2. Replies
    71
    Views
    32,938

    Re: Beginner in need of help !!

    Rob,

    Why don't you check this out.



    'PIC 12F683

    #CONFIG
    __config _INTRC_OSC_NOCLKOUT & _WDT_OFF & _MCLRE_OFF & _CP_OFF
  3. Replies
    71
    Views
    32,938

    Re: Beginner in need of help !!

    Rob,

    Looks like you got it working.:)

    One little thing though.
    The Pause command is based upon the "DEFINE OSC" value to calculate the pause interval correctly.
    It is a good practice to have...
  4. Replies
    71
    Views
    32,938

    Re: Beginner in need of help !!

    Glad to hear if Rob.

    You did not say what is happening only that it is not working.
    I took a look at your code and several things jump out at me.

    1. You are jumping into the deep end of the...
  5. Replies
    71
    Views
    32,938

    Re: Beginner in need of help !!

    Exactly!:biggrin:

    CMCON0 Register:
    bit 6 COUT: Comparator Output bit.
    This is the logic bit output of the Comparator.

    CM: Comparator Mode = 100
    7686

    With this setup the comparator is...
  6. Replies
    71
    Views
    32,938

    Re: Beginner in need of help !!

    Rob,

    Yes you're not testing the correct bit for the actual output of the Comparator..

    Look at my post again where I listed the things you need to correct. Look at item 2.
    I point you to...
  7. Replies
    71
    Views
    32,938

    Re: Beginner in need of help !!

    Rob,

    One correction in my earlier post.

    The CVref calculation for High Range is CVREF = (VDD/4) + (VR3:VR0 X VDD/32).
    Using your input values of VDD=3.3 and VR3:VR0=8, the calculation will...
  8. Replies
    71
    Views
    32,938

    Re: Beginner in need of help !!

    Rob,

    Glad to see your working through the design and issues.
    You are very close.:smile:

    Here are a couple of things you need to correct.
    1. VRCON: Look at the register description in...
  9. Replies
    71
    Views
    32,938

    Re: Beginner in need of help !!

    Rob,

    Yes Comparators can be confusing the 1st time using them on the PIC MCU.

    First, have a read through this link. ...
  10. Replies
    71
    Views
    32,938

    Re: Beginner in need of help !!

    Rob,

    I don't think the ADC module will accomplish what you are attempting as Henrik stated in his last reply.
    You should look into the Comparator of the PIC, again as Henrik suggested.
    :D
  11. Replies
    71
    Views
    32,938

    Re: Beginner in need of help !!

    Rob,

    Glad it worked for you.

    I'm not sure if you want/need to stay in the ISR as I don't know your final objective.

    I would suggest using a flag to determine the state of the IOC.3 interrupt...
  12. Replies
    71
    Views
    32,938

    Re: Beginner in need of help !!

    This should work for you. It works in my simulator.

    Also, since PBP's ON INTERRUPT only checks to see if an interrupt has occurred between PBP commands, you may want to use a loop counter in your...
Results 1 to 12 of 12