Do PICs goto sleep?


Closed Thread
Results 1 to 18 of 18

Hybrid View

  1. #1
    Join Date
    Feb 2005
    Location
    Essex, UK
    Posts
    154


    Did you find this post helpful? Yes | No

    Default

    Bugger, i think it might be due to no pull-down resistors.

    I've attahced my circuit, would this be the case?

    What values are recommended ?

    Hopefully that is the problem which is reasonably easy to fix.

    Regards,

    Steve
    Attached Images Attached Images  

  2. #2
    J_Brittian's Avatar
    J_Brittian Guest


    Did you find this post helpful? Yes | No

    Default

    Try 5K. Hopefully that fixes your problem.

  3. #3
    Join Date
    Feb 2005
    Location
    Essex, UK
    Posts
    154


    Did you find this post helpful? Yes | No

    Default

    The pull-down resistors didn't make any difference, the LED keeps in the 'error' flash routine. I didn't have and 5K, so i used a 2k2, would this still perform the task? If not i have 47k?

    However, i have inserted:

    Code:
    Main:
        MaskSwitch=PORTC & $07
            Select Case MaskSwitch
              Case 1 '%00000001 or SW1
                Gosub Procedure_SW1
    
              Case 2 '%00000010 or SW2
                Gosub Procedure_SW2
    
              Case 4 '%00000100 or SW3
                Gosub Procedure_SW3
              Case Else
                Goto Main
        End Select
    Goto Main
    Adding the Goto Main routine now seems to work.

    Although this is a work around, its still strange that some other signal is being received into the PIC which i would like to find.

    Cheers.

  4. #4
    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    237


    Did you find this post helpful? Yes | No

    Post

    After looking at the HiRK-433 datasheet(assuming this is the one you use http://www.okwelectronics.com/datasheets/DS.0010-2.pdf ), i say that there is no need for pulldowns(or ups). Just make sure your JP1 and 2 are not linked. This would make the outputs latching, you want them to be momentary.

    /Ingvar

  5. #5
    Join Date
    Feb 2005
    Location
    Essex, UK
    Posts
    154


    Did you find this post helpful? Yes | No

    Default

    Yup, thats the exact one.

    Ok, i'll remove the pull-down resistors.

    It must be something else that is making the CASE ELSE statement true then.

    Cheers,

    Steve

  6. #6
    Join Date
    Aug 2005
    Posts
    57


    Did you find this post helpful? Yes | No

    Default

    When I am developing a project I always have a serial port available ,even if the project will not use it.Being able to check variables and ports is invaluable for debugging,versus debugging blind.

  7. #7
    Join Date
    Feb 2005
    Location
    Essex, UK
    Posts
    154


    Did you find this post helpful? Yes | No

    Default

    OK, i'm ready for a slap !!

    I failed to put a pull-up on the MCLR port. The thing is, i put it on my diagram, but failed to put it on the vero circuit.

    Thanks again to all those that helped. I did solve another a couple of issues at the same time. So all was not wasted.

    Regards,

    Steve

  8. #8
    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    237


    Did you find this post helpful? Yes | No

    Talking

    Here comes the ruler ......... Nah, that's to easy on somebody who forgot something as serious as a pullup on MCLR. It's time for Melanie to get into her leather outfit and teatch you real good, that way it'll surely never happen again. It might, however, make me want to forget all about resistors .... and their proper use

Similar Threads

  1. Making a menu
    By chrisshortys in forum mel PIC BASIC Pro
    Replies: 36
    Last Post: - 12th November 2008, 19:54
  2. Replies: 14
    Last Post: - 26th September 2007, 05:41
  3. Problems with RC2 and RC3
    By Christopher4187 in forum General
    Replies: 11
    Last Post: - 29th May 2006, 17:19
  4. 3 HPWM channels
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 4th April 2006, 02:43
  5. Output PIC module
    By freelancebee in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th September 2005, 20: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