general purpose password protected menu


Results 1 to 10 of 10

Threaded View

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


    Did you find this post helpful? Yes | No

    Default

    Password worked for me here using ExtractNow software. I've attached a non-password zip here with the code, .HEX and what I feel to be a ISIS schematic.

    Let's post the code here too
    Code:
    '****************************************************************
    '*  Name    : UNTITLED.BAS                                      *
    '*  Author  : Hasan YETİK TOBB-ETÜ Elektrik-Eletronik Müh.      *
    '*  Notice  : Copyright (c) 2009 Hasan YETİK                    *
    '*          : All Rights Reserved                               *
    '*  Date    : 19.02.2009                                        *
    '*  Version : 1.0                                               *
    '*  Notes   :                                                   *
    '*          :                                                   *
    '****************************************************************
    TRISC=0  'LCD BAGLANTILARI
    TRISB=%00001110 'B PORTU KEYPAD
    OPTION_REG.7=0 
    TUS var byte
    ''''''''''''''''''''''''''''''''''''''''''''lcd TANIMLAMALARI
    DEFINE OSC 20
    DEFINE LCD_DREG		PORTC	'LCD data bacakları PortB de bğlı
    DEFINE LCD_DBIT			4		'LCD data bacakları 4. bitten başlıyor
    DEFINE LCD_EREG		PORTC	'LCD Enable Bacağı PortB de bağlı
    DEFINE LCD_EBIT			3		'LCD Enable Bacağı 3. bite bağlı	
    DEFINE LCD_RWREG    		PORTC	'LCD RW Bacağı Portc de bağlı
    DEFINE LCD_RWBIT     		2		'LCD RW Bacağı  2. bite bağlı
    DEFINE LCD_RSREG		PORTC	'LCD RS Bacağı PortB de bağlı
    DEFINE LCD_RSBIT		1		'LCD RS bacağı 1. Bite bağlı		
    DEFINE LCD_BITS			4		'LCD 4 bit  olarak bağlı
    DEFINE LCD_LINES		4		'LCD 2 sıra olarak çalışıyor.
    'DEĞİŞKEN TANIMLAMALARI
    symbol YATAY_A=PORTB.4           'keypad symbolleri
    SYMBOL YATAY_B=PORTB.5
    SYMBOL YATAY_C=PORTB.6
    SYMBOL YATAY_D=PORTB.7
    SYMBOL DIKEY_1=PORTB.1
    SYMBOL DIKEY_2=PORTB.2
    SYMBOL DIKEY_3=PORTB.3
    CounterA            var byte
    Match               var byte
    sifre               var WORD[6]
    sifreyeni           var WORD[6]
    sifre2              var WORD[6]
    DEFAULT  VAR WORD[6]
    KONTROL VAR WORD[6]    
    DURUM VAR byte[1]
    ILK:        
                
                READ 9,DURUM
                pause 100
                if durum="a" then 
                goto start
                else
                write 1,3
                write 2,3
                write 3,3
                write 4,3
                write 5,3
                write 6,3
                lcdout $FE,1,"SIFRE:333333"
                lcdout $FE,$C0,"SIFREYI DEGISTIRIN"
                pause 1000
                GOTO START
                endif
           
    Start:
            match=0
            lcdout $FE,1,"SIFREYI GIRIN"
            for countera = 0 to 5
                
                read 1,sifre2[0]
                read 2,sifre2[1]
                read 3,sifre2[2]
                read 4,sifre2[3]
                read 5,sifre2[4]
                read 6,sifre2[5]
                gosub TUSOKU
                if tus=80 then sifred
                if TUS=sifre2[countera] then Match=Match+1
                lcdout $FE,($C0+COUNTERA),"*"
                next countera
    
            if match=6 then
                lcdout $FE,1,"SIFRE DOGRU!"
                else
                    lcdout $FE,1,"YANLIS SIFRE"
                    match=0
                endif
    
            PAUSE 1000
            goto start
    sifred:
    
    lcdout $FE,1,"ESKI SIFREYI GIRIN"
            
                read 1,sifre[0]
                read 2,sifre[1]
                read 3,sifre[2]
                read 4,sifre[3]
                read 5,sifre[4]
                read 6,sifre[5]
             
            for countera = 0 to 5
                gosub TUSOKU
                if TUS=sifre[countera] then Match=Match+1
                lcdout $FE,($C0+COUNTERA),"*"
                next countera
    
            if match=6 then
                    lcdout $FE,1,"SIFRE DOGRU!"
                    goto sifred2
                else
                    lcdout $FE,1,"YANLIS SIFRE"
                    match=0
                    goto sifred
                endif
                
    sifred2:
                lcdout $FE,1,"YENI SIFRE:"
                for countera=1 to 6
                gosub TUSOKU
                write countera,tus
                lcdout $FE,($C0+(COUNTERA-1)),"*"
                next countera
                write 9,"a"
                lcdout $FE,1,"SIFRE DEGISTI"
                PAUSE 1000         
                goto start
    
    
    
    
    
    TUSOKU:
    tus=99
    PORTB=254
    YATAY_A=0                       'YATAY_A=0 IÇIN KONTROL
    IF DIKEY_1=0 THEN               'DIKEYDEKI TUS1 BASINCA IÇERIGI 0 OLUR BIR KOMUT ATLA
    TUS=1
    WHILE DIKEY_1=0                 'BUTON HALA SIFIRMI KONTROL ET
    WEND
    ENDIF                           'IF ISLEMININ SONU
    
    IF DIKEY_2=0 THEN
    TUS=2
    WHILE DIKEY_2=0
    WEND
    ENDIF
    
    IF DIKEY_3=0 THEN
    TUS=3
    WHILE DIKEY_3=0
    WEND
    ENDIF
    HIGH YATAY_A
    
    YATAY_B=0
    IF DIKEY_1=0 THEN              
    TUS=4
    WHILE DIKEY_1=0                 
    WEND
    ENDIF                           
    
    IF DIKEY_2=0 THEN
    TUS=5
    WHILE DIKEY_2=0
    WEND
    ENDIF
    
    IF DIKEY_3=0 THEN
    TUS=6
    WHILE DIKEY_3=0
    WEND
    ENDIF
    HIGH YATAY_B
    
    
    YATAY_C=0
    IF DIKEY_1=0 THEN              
    TUS=7        
    WHILE DIKEY_1=0                 
    WEND
    ENDIF                           
    
    IF DIKEY_2=0 THEN
    TUS=8
    WHILE DIKEY_2=0
    WEND
    ENDIF
    
    IF DIKEY_3=0 THEN
    TUS=9
    WHILE DIKEY_3=0
    WEND
    ENDIF
    
    HIGH YATAY_C
    
    
    YATAY_D=0
    IF DIKEY_1=0 THEN 
    tus=80
    WHILE DIKEY_1=0
    WEND
    ENDIF
    
    
    IF DIKEY_2=0 THEN 
    tus=0
    WHILE DIKEY_2=0
    WEND
    ENDIF
    
    
    IF DIKEY_3=0 THEN 
    tus=0
    WHILE DIKEY_3=0
    WEND
    ENDIF
    HIGH YATAY_D
    IF TUS=99 THEN TUSOKU
    RETURN
    Attached Files Attached Files
    Steve

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

Similar Threads

  1. lcd menu problems
    By xxxxxx in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 2nd April 2009, 19:00
  2. interactive menu with hyperterminal
    By jamied in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 5th January 2009, 11:13
  3. need help in coding..
    By daphne8888 in forum mel PIC BASIC
    Replies: 1
    Last Post: - 19th March 2008, 07:31
  4. Sending menu to PC from PIC16F876A
    By joseph Degorio in forum Serial
    Replies: 2
    Last Post: - 12th November 2007, 07:03
  5. A little DTMF help
    By Travin77 in forum mel PIC BASIC Pro
    Replies: 48
    Last Post: - 30th May 2006, 01:31

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