barcode reader asp.net web application How should the keyboard be wired to the controller 2 What about switch bouncing in Software

Make QR Code ISO/IEC18004 in Software How should the keyboard be wired to the controller 2 What about switch bouncing

1 How should the keyboard be wired to the controller 2 What about switch bouncing
Decoding Quick Response Code In None
Using Barcode Control SDK for Software Control to generate, create, read, scan barcode image in Software applications.
Denso QR Bar Code Maker In None
Using Barcode maker for Software Control to generate, create QR Code 2d barcode image in Software applications.
2 2 Switch Matrix
Scan QR Code In None
Using Barcode scanner for Software Control to read, scan read, scan image in Software applications.
Draw QR-Code In Visual C#
Using Barcode maker for VS .NET Control to generate, create QR image in Visual Studio .NET applications.
Figure 21.12 connections.
QR Encoder In .NET
Using Barcode printer for ASP.NET Control to generate, create QR Code image in ASP.NET applications.
Printing QR Code In .NET Framework
Using Barcode encoder for .NET Control to generate, create QR Code image in .NET applications.
Switch matrix keyboard
Make QR Code In Visual Basic .NET
Using Barcode generator for .NET framework Control to generate, create QR Code 2d barcode image in .NET framework applications.
Code 128B Printer In None
Using Barcode generator for Software Control to generate, create Code128 image in Software applications.
PROJECTS
Printing EAN / UCC - 13 In None
Using Barcode maker for Software Control to generate, create GS1-128 image in Software applications.
Printing Data Matrix ECC200 In None
Using Barcode encoder for Software Control to generate, create Data Matrix 2d barcode image in Software applications.
Unregulated Voltage Input
Create Barcode In None
Using Barcode printer for Software Control to generate, create bar code image in Software applications.
European Article Number 13 Drawer In None
Using Barcode generator for Software Control to generate, create EAN13 image in Software applications.
10 K 10 uF
Make UPC - E0 In None
Using Barcode generation for Software Control to generate, create GS1 - 12 image in Software applications.
Painting EAN / UCC - 13 In VS .NET
Using Barcode creation for Reporting Service Control to generate, create GS1 128 image in Reporting Service applications.
PIC16C57 27 3 V OSCI dd 28 _MCLR OSCO 28
UCC-128 Printer In Objective-C
Using Barcode generator for iPad Control to generate, create EAN / UCC - 14 image in iPad applications.
Encode Data Matrix ECC200 In C#
Using Barcode creator for Visual Studio .NET Control to generate, create Data Matrix image in Visual Studio .NET applications.
Vcc 1 V ss 10 RB0 PORTC
Paint Code 39 Full ASCII In Java
Using Barcode generator for Java Control to generate, create Code 39 Extended image in Java applications.
Painting Bar Code In Visual Basic .NET
Using Barcode creation for .NET Control to generate, create barcode image in Visual Studio .NET applications.
4 MHz
Make European Article Number 13 In Java
Using Barcode creator for Eclipse BIRT Control to generate, create UPC - 13 image in BIRT reports applications.
Decode GS1-128 In VB.NET
Using Barcode scanner for .NET Control to read, scan read, scan image in .NET framework applications.
0.1 uF 2
10 K 8
Key Board
9 8 7 6
MAX232
5 4 3 2 1
C1+ Vcc V+ Gnd C1 T1out + C2+ R1in C2 R1Out V T1in T2Out T2in R2in R2Out +
PORTB
5x 1.0 uF Caps
Keyboard interface circuitry.
3 What about multiple keys pressed at the same time 4 What about Shift/Ctrl/Alt/Function key modi ers
In developing the rst software application for the project Key1, I had to understand these issues and have a plan to deal with them. The source for the Key application can be found in the code\Key folder. Note that these applications were designed to work with a keyboard that I found for a dollar in a surplus store in Toronto a number of years ago. The keyboard was manufactured by General Instruments for the Texas Instruments TI-1000 personal computer that was last built over 25 years ago. There is no visible part number on the device itself except for the Texas Instruments logo. I doubt that you will be able to nd this keyboard, but this still makes this application and the process I went through to decode the keyboard useful as a reference for whatever keyboards or keypads you want to work with. The schematic of the circuit I used is shown in Fig. 21.13. To assemble my prototype, I used a vector board, which is a PCB that has a series of copper strips on the backside; to make a circuit, wires (or components) are soldered to a speci c strip. The strip can be cut to allow multiple circuits to use the same strip. This method of prototyping is somewhat obscure, but it can be very useful when single-bussed devices, such as the keyboard (or an LCD), are being prototyped in the circuit. I have used the vector board in a few of the projects simply because it is reasonable for the applications. The bill of materials for the circuit is listed in Table 21.5. For my prototype, I used a 9-V alkaline radio battery to the circuit to power it. My original intention was to use the keyboard interface with the serial LCD interface (presented earlier in this chapter) to make a simple 1,200 bps RS-232 TTY terminal. Actually, this still can be done using these two components.
LOW-END DEVICES
TABLE 21.5
KEY BILL OF MATERIALS DESCRIPTION
REFERENCE DESIGNATOR
PIC16C57 78-5 MAX232 4-MHz 10-k 10-k 10- F 2 0.1- F 8
PIC16C57-JW 78L05 in TO-92 package Maxim MAX232 4-MHZ ceramic resonator with built-in capacitors 10 k , 1/4 W 10-k single common tap 9-pin SIP
10- F, 35-V electrolytic 0.1- F, 16-V tantalum 9-pin female D-shell connector Prototype card, hook-up wire, 15 of keyboard 1 IDC connector
RS-232 connector Misc.
Trying to gure out how a keyboard should be wired to the PIC microcontroller when you don t have any information is not as daunting a task as it would appear to be. When I bought the keyboard for this project, the only identifying feature on it with regard to electrical connections was a strip indicating pin 1 on a 15-pin IDC connector. The rst thing that I did was set up a matrix and using a digital multimeter. I beeped out every key with the two different connector pins. With this information, I created the matrix shown below:
Pin 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 2 3 4 5 6 7 8 9 10 V R 4 C E 3 X W 2 Ctrl Fctn B Z T Q 5 1 Caps 11 M , . = 12 13 J F k D L S Shft 14 7 8 9 15 U I O Ent
N H G 6 Y / ; A 0 P
Once this was done, I manipulated the table until I could get a good understanding of how the keyboard was wired and what would be the best way to attach it to the PIC microcontroller.
PROJECTS
The design point I decided on was setting up eight rows (or register bits) for each column. I de ned the row as where I put the pull-up and the column as the pin I pull to ground. The data was transformed into the following matrix, where the rows and columns are the pin numbers on the connector:
Column 1 2 3 4 7 8 10 Row -> 5 V C X B 6 R E W Ctrl T Q 9 4 3 2 Func 5 1 Caps 11 M , . = N / 12 J K L H ; 13 F D S Shift G A 14 7 8 9 6 0 15 U I O Enter Y P
With this information, I was ready to specify the wiring. At this point, the task was simply to wire the rows and columns to the PIC microcontroller. The rows having the pull-up noted above and connected to PORTC and the columns pulled down within PORTB. I used a PIC16C57 for the keyboard and an RS-232 interface because it had more than enough I/O pins to handle the 15 pins required by the keyboard. I outputted the NRZ serial data (through a MAX232) to my PC s RS-232 HyperTerminal emulator so that I could monitor what was coming out (and, if needed, send debug information as well). To read the keys, I used the algorithm
KeyPreviously = 0 Loop: Dlay4ms if KeyPreviously = 0 KeyCount = 0 ; Reset # of Times through Loop ; Delay for key Debouncing ; Nothing Currently read
for i = 0 to # columns and No KeyPreviously Scan Column ; Check each Column and Set ; KeyPreviously else ; Else Key Previously pressed
if KeyPreviously Still Pressed KeyCount = KeyCount + 1 if KeyCount == 5 ; ; Increment the Actual Count
Copyright © OnBarcode.com . All rights reserved.