Clavier de commande codé

 

Ce système permet d'activer deux sorties complémentaires (sortie sur collecteur ouvert) lorque le code à 4 chiffres (paramétrables) est correct et ceci pendant un durée comprise entre 1 et 65 secondes. Le système gère un clavier matricé 3x4.


Une led bicolore (en haut à droite du condensateur chimique) indique l'état du système.
Un transducteur piézo-électrique complète le dispositif. Il permet de signaler l'appuis d'une touche et les erreurs.
Un cavalier permet de modifier :
- Le code à 4 chiffres.
- Le temps d'activation des sorties (de 1 à 65 secondes).
- Activation ou non du transducteur (toujours actif en mode programmation).
- Activation ou non d'une pause de 1.5s (3 bips espacé de 0.5s) avant activations des sorties.
- Activation ou non d'un blocage du clavier après un code erroné.
- Durée de blocage du clavier après l'introduction d'un code erroné (de 1 à 65 secondes).


Nomenclature

CI1 = PIC16F84-04 + support DIL 18b

REG1 = 78L05ACP

R1 = 10k
R2 = 10k
R3 = 1k
R4 = 1k
R5 = 1k
R6 = 470
R7 = 10k
R8 = 10k
Toutes des 5% 1/4W
1 réseau de 4xR de 10k avec un point commun

C1 = 100 nF
C2 = 100 nF
C3 = 100 nF
C4 = 100 nF
C5 = 100 µF

D1 = 1N4007

T1 = BC546
T2 = BC546

1 résonateur 4MHz avec C intégrées

1 cavalier + 1 x 2 contacts e=2.54 mm
1 bornier 2 points e=5.08 mm
1 connecteur 1x7 e=2.54 mm
1 transducteur piézo-électrique


explications complémentaires:
Le Watchdog doit être activé et l'oscillateur = XT

Pour le réglage :
- éteindre
- Enlever le cavalier
- allumer (bip grave)

- taper le code à quatre chiffres
- puis taper # ou * (trois impulsions dans le buzzer)

- taper la durée en seconde de l'activation des sorties (de 01 à 65)
- taper 00
- puis taper # ou * (trois impulsions dans le buzzer)

- taper la configuration - 0(off) & 1(on)
- a = son on/off
- b = pause de 1.5s apres un code valide on/off
- C = inhibition clavier on/off
- taper 0
- puis taper # ou * (trois impulsions dans le buzzer)

- taper la durée en seconde de l'inhibition du clavier apres un mauvais code (de 00 à 65)
- taper 00
- puis taper # ou * (trois impulsions dans le buzzer)

- la led bicolor s'active (vert ou rouge suivant le câblage) pour signaler que c'est terminé.
- éteindre
- remettre le cavalier
- le système est alors configuré.

Lors de la configuration le buzzer est actif même si a=0

Il suffit maintenant de composer le nombre à 4 chiffres et de valider par * ou #
pour que les sorties changent d'etat pendant la durée programmé.

Le programme disponible est fonctionnel.
Attention le PIC16C84 ne convient pas (pas assez de RAM).

Pour la connexion du clavier :

Sortie PIC    Entrée clavier
B6         colonne 1 (1,4,7,*)
B5        colonne 2 (0,2,5,8)
B4         colonne 3 (3,6,9,#)
B0         ligne 1 (1,2,3)
B1         ligne 2 (4,5,6)
B2         ligne 3 (7,8,9)
B3         ligne 4 (*,0,#)

Schema electronique:


implantation
 

Le typon
  


Le fichier .HEX pour PIC16F84:

:020000040000FA
:10000000C0288F00280884002609282084138F0820
:100010000319BB28F03091000E0880389000F030B2
:1000200091030319910003198F030319BB281828A2
:100030002B2003010C1826088E1F26088E08031992
:100040000301900F252880060C28262800000F2881
:1000500084178005BB280D080C0403198C0A803016
:100060000C1A8D060C198D068C188D060D0D8C0D35
:100070008D0DBB2889008316081483120808BB283D
:1000800088008316081555308900AA308900881425
:10009000881848280811BB288F018E00FF308E0772
:1000A000031C8F07031CBB2803308D00DF305A2050
:1000B0004E288D01E83E8C008D09FC30031C63281E
:1000C0008C07031860288C0764008D0F60280C18BB
:1000D00069288C1C6D2800006D2808008D018F0197
:1000E0008E00023075288E00053094000F080D0236
:1000F000031D7C280E080C0204300318013003197C
:1001000002301405031DFF30BB280404031DFF301B
:10011000BB2891019001103092000D0D900D910DB2
:100120000E0890020F08031C0F0F910203189F285E
:100130000E0890070F0803180F0F910703108C0D7E
:100140008D0D920B8D280C08BB28103094008D016A
:100150008C01930C920C031CB3280E088C070F081B
:1001600003180F0F8D078D0C8C0C910C900C940BB9
:10017000A9281008BB288313031383126400080006
:100180008316103085000F308600831285018601AA
:1001900001308F00F4304D20B41003303A20B2000B
:1001A00064304C206400051A54290511831605118A
:1001B0008312851583168511831285108316851089
:1001C00083120514831605108312AE2164003418BF
:1001D000E52800303A20AC0001303A20AD002A0872
:1001E0008C002B088D002D088F002C087320031D18
:1001F0003B296400B21C0B2901308F00F4304D20E4
:10020000022301308F00F4304D20022301308F0093
:10021000F4304D20022385148316851083120510B7
:100220008316051083120515831605118312851197
:1002300083168511023083123A20B90039089200E2
:100240009301E8308E0003308F00A520B000110824
:10025000B10030088C0031088D008F010030732010
:10026000031D3629E830B0000330B10031088F009B
:1002700030084D20D52824236400321D5129043034
:100280003A20B900390892009301E8308E0003301B
:100290008F00A520B0001108B10031088F00300890
:1002A0004D2064304C20D528B414242385108316A7
:1002B000851083120510831605108312051183160D
:1002C000051183128511831685118312AE216400F6
:1002D0003418542989012A084020013089002B084C
:1002E00040200223AE216400341854292A088C00CF
:1002F0002B088D0064308E008F018920AA000D0824
:10030000AB00023089002A0840200223AE2164009D
:100310003418542903308900330840200223AE21C9
:100320006400341854292A088C002B088D0064308E
:100330008E008F018920AA000D08AB0004308900CF
:100340002A08402002238514831685108312051085
:1003500083160510643083124C20A329B501B60121
:10036000B701B801B3013410692264003A08013CB6
:10037000031DBB2933143A088C000A306E209E00FE
:100380003A088C00FF306E20A0001E088400200870
:100390008520A000A1006400200821040319D229AF
:1003A000341408003A08B500692264003A08013C98
:1003B000031DDB29B3143A088C000A306E209E001E
:1003C0003A088C00FF306E20A0001E088400200830
:1003D0008520A000A1006400200821040319F2294F
:1003E000341408003A08B600692264003A08013C57
:1003F000031DFB2933153A088C000A306E209E003D
:100400003A088C00FF306E20A0001E0884002008EF
:100410008520A000A1006400200821040319122AED
:10042000341408003A08B70069223A088C000A30F0
:100430006E209E003A088C00FF306E20A0001E083F
:10044000840020088520A000A10064002008210469
:1004500003192C2A341408003A08B80069226400F1
:100460003A080A3C0319362A341408003508920069
:100470009301E8308E0003308F00A5209E00110804
:100480009F0036089200930164308E008F01A520F2
:10049000A0001108A1001E08A0071F080318013EB4
:1004A000A1073708920093010A308E008F01A52022
:1004B000A2001108A3002008A20721080318013E8A
:1004C000A30738082207AA0023080318013EAB003F
:1004D0000800AE01AF01FF30BA00061286120617FF
:1004E00001304C20861D7C2A0A30BA0096304C2000
:1004F0008619782A02230800061D862A0730BA00CA
:1005000096304C200619822A02230800861C902A65
:100510000430BA0096304C2086188C2A022308003A
:10052000061C9A2A0130BA0096304C200618962AEA
:100530000223080006128616061301304C20861D81
:10054000A82ABA0196304C208619A42A0223080052
:10055000061DB22A0830BA0096304C200619AE2A81
:1005600002230800861CBC2A0530BA0096304C20B5
:100570008618B82A02230800061CC62A0230BA00D0
:1005800096304C200618C22A02230800061686124E
:10059000061301304C20861DD52A0A30BA00963049
:1005A0004C208619D12A02230800061DDF2A0930B3
:1005B000BA0096304C200619DB2A02230800861C5C
:1005C000E92A0630BA0096304C208618E52A022324
:1005D0000800061CF32A0330BA0096304C20061897
:1005E000EF2A02230800AE0A0319AF0A2E088C0076
:1005F0002F088D0003308F00E8307320031D012B7E
:1006000008006B2A0030321801308C0001306E2057
:100610009E000030B41801308C0001306E20A00024
:100620001E08840020088520A000A1006400200886
:1006300021040319232B0630A8008030A6007D304A
:100640008E000630012008000030321801308C0086
:1006500001306E209E000030B41801308C00013053
:100660006E20A0001E08840020088520A000A100A4
:100670006400200821040319452B0630A8008030AF
:0C068000A60028308E000A30012008007F
:02400E00F53F7C
:00000001FF

 Code HEX pour PIC16F628 :

:020000040000FA
:10000000BF28A3003C0884003A0928208413A308D1
:100010000319BA28F030A50022088038A400F03077
:10002000A5030319A5000319A3030319BA28182867
:100030002B20030120183A08A21F3A08A20803192E
:100040000301A40F252880060C28262800000F286D
:1000500084178005BA28210820040319A00A8030DB
:10006000201AA1062019A106A018A106210DA00D95
:10007000A10DBA2883169B001C141A08BA288316EF
:100080009A001C1555309D00AA309D009C149C18A8
:1000900047281C11BA28A301A200FF30A207031CA5
:1000A000A307031CBA280330A100DF3059204D28D4
:1000B000A101E83EA000A109FC30031C6228A007B2
:1000C00003185F28A0076400A10F5F282018682884
:1000D000A01C6C2800006C280800A101A301A2004C
:1000E00002307428A2000530A80023082102031D55
:1000F0007B28220820020430031801300319023043
:100100002805031DFF30BA280404031DFF30BA2858
:10011000A501A4011030A600210DA40DA50D2208F3
:10012000A4022308031C230FA50203189E282208FB
:10013000A40723080318230FA5070310A00DA10D82
:10014000A60B8C282008BA281030A800A101A00115
:10015000A70CA60C031CB2282208A007230803182A
:10016000230FA107A10CA00CA50CA40CA80BA82878
:100170002408BA288313031383126400080083162B
:10018000103085000F30860083128501860107300C
:100190009F0083169F0183120130A300F4304C208E
:1001A000C81003303A20C60064304B206400051AA2
:1001B000582905118316051183128515831685119B
:1001C000831285108316851083120514831605107B
:1001D0008312BC2164004818E92800303A20C0008E
:1001E00001303A20C1003E08A0003F08A1004108AC
:1001F000A30040087220031D3F296400C61C0F297C
:100200000130A300F4304C2010230130A300F4305F
:100210004C2010230130A300F4304C20102385140F
:100220008316851083120510831605108312051599
:1002300083160511831285118316851102308312EE
:100240003A20CD004D08A600A701E830A2000330F7
:10025000A300A420C4002508C5004408A000450848
:10026000A100A30100307220031D3A29E830C40028
:100270000330C5004508A30044084C20D928322388
:100280006400461D552904303A20CD004D08A600D3
:10029000A701E830A2000330A300A420C400250871
:1002A000C5004508A30044084C2064304B20D928E1
:1002B000C814322385108316851083120510831607
:1002C00005108312051183160511831285118316FB
:1002D00085118312BC2164004818582983169B019C
:1002E00083123E083F20831601309B0083123F0893
:1002F0003F201023BC216400481858293E08A00064
:100300003F08A1006430A200A3018820BE0021089C
:10031000BF00831602309B0083123E083F2010234B
:10032000BC21640048185829831603309B008312AF
:1003300047083F201023BC216400481858293E0874
:10034000A0003F08A1006430A200A3018820BE00E5
:100350002108BF00831604309B0083123E083F2013
:10036000102385148316851083120510831605103B
:10037000643083124B20B129C901CA01CB01CC01E1
:10038000C7014810772264004E08013C031DC929AB
:1003900047144E08A0000A306D20B2004E08A0009D
:1003A000FF306D20B4003208840034088420B4008B
:1003B000B5006400340835040319E0294814080026
:1003C0004E08C900772264004E08013C031DE9294C
:1003D000C7144E08A0000A306D20B2004E08A000DD
:1003E000FF306D20B4003208840034088420B4004B
:1003F000B5006400340835040319002A48140800C5
:100400004E08CA00772264004E08013C031D092AE9
:1004100047154E08A0000A306D20B2004E08A0001B
:10042000FF306D20B4003208840034088420B4000A
:10043000B5006400340835040319202A4814080064
:100440004E08CB0077224E08A0000A306D20B20083
:100450004E08A000FF306D20B4003208840034083C
:100460008420B400B50064003408350403193A2A26
:10047000481408004E08CC00772264004E080A3C5D
:100480000319442A481408004908A600A701E830C7
:10049000A2000330A300A420B2002508B3004A083C
:1004A000A600A7016430A200A301A420B40025087F
:1004B000B5003208B40733080318013EB5074B08EE
:1004C000A600A7010A30A200A301A420B6002508B7
:1004D000B7003408B60735080318013EB7074C08C3
:1004E0003607BE0037080318013EBF000800C201EE
:1004F000C301FF30CE0006128612061701304B20D2
:10050000861D8A2A0A30CE0096304B208619862A0C
:1005100010230800061D942A0730CE0096304B2089
:100520000619902A10230800861C9E2A0430CE004B
:1005300096304B2086189A2A10230800061CA82AF9
:100540000130CE0096304B200618A42A1023080054
:1005500006128616061301304B20861DB62ACE01E0
:1005600096304B208619B22A10230800061DC02A97
:100570000830CE0096304B200619BC2A1023080004
:10058000861CCA2A0530CE0096304B208618C62A13
:1005900010230800061CD42A0230CE0096304B20CF
:1005A0000618D02A102308000616861206130130FA
:1005B0004B20861DE32A0A30CE0096304B20861948
:1005C000DF2A10230800061DED2A0930CE009630E0
:1005D0004B200619E92A10230800861CF72A06304A
:1005E000CE0096304B208618F32A10230800061CF4
:1005F000012B0330CE0096304B200618FD2A102325
:100600000800C20A0319C30A4208A0004308A10057
:100610000330A300E8307220031D0F2B0800792A55
:10062000003046180130A00001306D20B2000030CB
:10063000C8180130A00001306D20B40032088400D9
:1006400034088420B400B50064003408350403196C
:10065000312B0630BC008030BA007D30A20006305D
:1006600001200800003046180130A00001306D2044
:10067000B2000030C8180130A00001306D20B40075
:100680003208840034088420B400B50064003408C3
:1006900035040319532B0630BC008030BA002830D3
:0806A000A2000A30012008004D
:02400E00653F0C
:00000001FF

Aucun commentaire:

Enregistrer un commentaire