A few 12F683 questions


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    1. Yes...
    2. Sounds about right to me...
    3. Datasheet says you've gotta have INTs enabled...but the way it reads, it almost sounds like you don't NEED to have them enabled, in which case, you'd have to read the individual bits themselves.

  2. #2
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Thanks for confirming my timer configurations.

    On #3, I think we read the datasheet the same way. I believe most, if not all, interrupt flag bits get set whether or not interrupts are enabled. For example, the CCP1 Capture flag (PIR1.2) gets set even though interrupts are disabled. For most, this is usually stated explicitly in the datasheet but, in this case, the datasheet is a bit murky. Since I'll be using While !Capture:Wend loops to wait for rising/falling edges, I'll also monitor the IOC flag (INTCON.0) within the loops and then check the individual pins to determine whether it was set by an RS232 input or RS485 input. Otherwise, I'll just monitor both input pins within the loops.

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


    Did you find this post helpful? Yes | No

    Default

    #2. With a Timer0 reload value of 93, OPTION_REG = %10000100 would give you ~2.6mS
    overflow rate @8MHz.

    Note there's a 2-cycle inhibit period when writing to Timer0.

    #3. Yes. I do this all the time. You can enable individual interrupts and just monitor/reset
    each flag bit without global interrupts enabled.
    Regards,

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

  4. #4
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Thanks, Bruce.

    #2 That's what I get for doing the math in my head.

    #3 Actually, I'm adapting (i.e. stealing) one of your examples for the capture module.

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    No need for math... PICMultiCalc is all you need

    http://www.mister-e.org/pages/utilitiespag.html
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    No need for math... PICMultiCalc is all you need
    My copy was on the dead HDD and I couldn't recall the name.

Similar Threads

  1. 12F683 - Pin1 not working
    By ruijc in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th February 2014, 17:38
  2. New project help rapidfire on 12f683
    By thm ov3rkill in forum mel PIC BASIC Pro
    Replies: 27
    Last Post: - 27th December 2008, 19:59
  3. 12F683 Programmer
    By Red_Stafford in forum Schematics
    Replies: 9
    Last Post: - 2nd October 2008, 21:44
  4. 16f677a to 12f683
    By ChrisHelvey in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 25th July 2007, 06:16
  5. 12f683 comparator and pwm
    By Automan in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 23rd May 2007, 18:05

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