Digital touch Screen Combination lock


Closed Thread
Results 1 to 40 of 42

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,690


    Did you find this post helpful? Yes | No

    Default Re: Digital touch Screen Combination lock

    do you mean something like this

    no need to wear out the eeprom
    Code:
    ANSELA = 0
        DEFINE OSC 64 
        OSCCON = $70
        OSCTUNE.6 = 1
        TRISA = %11111100 
                                 
    led1 var porta.0    ; alias led1 to porta.0
    led2 var porta.1    ; alias led2 to porta.1
    x    var bit            ; tried to use X var as a bit in order to hold the value of the actual status of the pin.
    
    
     
    
    
    x = 0                  ; we write 0 to var X
    
    
    
    
    loopy:
    lata.0 = 1           ; we write 1 to lata.0
    gosub holdmem  ; gosub to holdmem
    
    
    pause 500
    led2  = x      ; write the value of x to led2
    pause 500
    led1=0
    @ nop
    led2=0
    pause 1000
    goto loopy
    
    
    holdmem:
    x = led1  ; read the state of the porta.0 and place it in x
    'x = lata.0  ;or  read the state of the lata.0 and place it in x
    return
     
    goto loopy
    Warning I'm not a teacher

  2. #2
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: Digital touch Screen Combination lock

    Quote Originally Posted by richard View Post
    do you mean something like this

    no need to wear out the eeprom
    Code:
    ANSELA = 0
        DEFINE OSC 64 
        OSCCON = $70
        OSCTUNE.6 = 1
        TRISA = %11111100 
                                 
    led1 var porta.0    ; alias led1 to porta.0
    led2 var porta.1    ; alias led2 to porta.1
    x    var bit            ; tried to use X var as a bit in order to hold the value of the actual status of the pin.
    
    
     
    
    
    x = 0                  ; we write 0 to var X
    
    
    
    
    loopy:
    lata.0 = 1           ; we write 1 to lata.0
    gosub holdmem  ; gosub to holdmem
    
    
    pause 500
    led2  = x      ; write the value of x to led2
    pause 500
    led1=0
    @ nop
    led2=0
    pause 1000
    goto loopy
    
    
    holdmem:
    x = led1  ; read the state of the porta.0 and place it in x
    'x = lata.0  ;or  read the state of the lata.0 and place it in x
    return
     
    goto loopy
    yes i think this is what i wanted to do. But when we use the following command:

    Code:
    x = led1  ; read the state of the porta.0 and place it in x
    arent we write to EEPROM? Or this is temprorarly held in memory?

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,690


    Did you find this post helpful? Yes | No

    Default Re: Digital touch Screen Combination lock

    arent we write to EEPROM? Or this is temprorarly held in memory?
    your lack of understanding exceeds my wildest expectation ,i wasn't prepared for a beginner.
    if you like pm with me with your email and i will send a pic tutorial book i have as a pdf . its too big to post on forum


    until you comprehend the basic concepts of memory types and uses , binary numbers , basic boolean algebra , logic
    operators , i/o concepts ..... its just too hard
    Warning I'm not a teacher

  4. #4
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: Digital touch Screen Combination lock

    thanks Richard will do.

Similar Threads

  1. 4 Wire resistive touch screen, Need help
    By Megahertz in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 16th February 2012, 18:28
  2. combination lock
    By korayfethi in forum Schematics
    Replies: 13
    Last Post: - 23rd May 2007, 21:02
  3. Round Dial, Electronic Combination Lock
    By Pic_User in forum Off Topic
    Replies: 5
    Last Post: - 6th July 2006, 14:34
  4. touch screen
    By micro in forum General
    Replies: 1
    Last Post: - 13th January 2006, 04:39
  5. Touch Screen Wish List!!!
    By Amity in forum PBP Wish List
    Replies: 2
    Last Post: - 15th September 2005, 15:40

Members who have read this thread : 2

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