DIP switch select delay


Closed Thread
Results 1 to 16 of 16

Hybrid View

  1. #1
    Join Date
    Nov 2007
    Posts
    4

    Default DIP switch select delay

    HI, I'm a beginner in PIC, I want to do a simple counter project using DIP switch to select Delay, the small project is actually working already with 2 x 7 segment display.. but I need a selectable startup delay.But I dunno how to do it.. keeps failing!
    here is what I wanted..
    dip1=on, dip2=on, dip3=on, dip4=on == 8secs delay
    dip1=on, dip2=off, dip3=off, dip4=off == 7secs delay
    dip1=on, dip2=on, dip3=off, dip4=off == 6secs delay
    dip1=off, dip2=off, dip3=off, dip4=off == 5secs delay
    and so on...
    I've attach a example sch.
    maybe you guys might know some reference code or similar(PICBASIC)I can view?

    Thanks!
    Attached Images Attached Images  

  2. #2
    Join Date
    Oct 2003
    Location
    holland
    Posts
    251


    Did you find this post helpful? Yes | No

    Default

    If dip1 = 1 and dip2 = 1 and dip3 = 1 and dip4 = 1 then
    pause 8000
    else
    if dip1 = 0 etc.



    endif

    or
    something var byte
    something = porta &%00111100
    if something = 60 then
    pause 8000
    else
    if something = etc.

    endif

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


    Did you find this post helpful? Yes | No

    Default

    It might help if someone knew what DIL 18 was.
    Regards,

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

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


    Did you find this post helpful? Yes | No

    Default

    it's a 18 pins device with a DIL package I'll bet it's a black one
    Steve

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

  5. #5


    Did you find this post helpful? Yes | No

    Default Might not be black

    Some are dark brown. Some even have writing on them - I wonder what this one is?

    Another clueless student trying to fudge a class project by the looks of it.

  6. #6
    Join Date
    Nov 2007
    Posts
    4


    Did you find this post helpful? Yes | No

    Default

    Yes it's 16F88 .. and it's 18pin... BLACK in color comes with some wording on top of it!! but I use my finger's to rub it off anyway.. and now it's unknown chips , so I put DIL18

    Thanks mat janssen , this is what I've done first... I'm sure somewhere must have coded wrongly.. I'll check tonite again!

    Thanks!

Similar Threads

  1. 16F628A - Stops if release power switch.
    By dene12 in forum General
    Replies: 16
    Last Post: - 14th February 2009, 07:57
  2. Old and beyond help ?
    By DavidFMarks in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 11th December 2008, 15:23
  3. RF Transmitter
    By et_Fong in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th October 2005, 16:34
  4. Memory Space of the PIC16F84...
    By Tear in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 1st July 2005, 19:55
  5. Problem with saving to EEPROM...
    By Tear in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 1st July 2005, 00:10

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