• Weird PS/2 mouse

    12/31/2022 at 18:07 1 comment

    What is PS/2?

    The PS/2 (Personal System/2) port, also referred to as the mouse port or keyboard port, was developed by IBM. It is used to connect a computer mouse or keyboard to an IBM compatible computer. The PS/2 port is a mini DIN plug containing six pins and is still sometimes found on all IBM compatible computers. 

    Came across a PS/2 mouse.  

    The mouse controller is PIC16C58!

    Touch or pressure sensor covered by US5431064A patent 

    A pressure sensitive transducer array in which a plurality of transducers are connected in series and in parallel with one another. In one embodiment, a resistive layer is formed from carbon or silver ink on a polyester film. A plurality of conductive shunt elements having greater conductivity than the resistive layer is formed on a second polyester film. The films are placed adjacent to one another with the shunt elements contacting the resistive layer. Voltage is applied across the resistive layer and pressure is applied thereto. As the pressure increases, the number of current paths set up through contact points on the shunt elements increase thereby decreasing the resistance across the resistive layer and increasing current flow. In another embodiment a plurality of plate elements are contained in a plane on one side of a dielectric layer. A plurality of plate elements are contained in a plane on the other side of the dielectric layer. As the layer is pushed together responsive to force applied, total capacitance as measured across the planes of plate elements varies.

    Sensor bottom view 

    https://patents.google.com/patent/US5431064

  • UPC barcode generator

    12/23/2022 at 11:00 0 comments

    000 REM UPC/EAN CODE GENERATOR 
    010 DIM p$(29), c%(12), q$(9), m%(100)
    020 INPUT " Enter the Number : "; u$
    030 FOR i% = 0 TO 9
    040 READ n$, s$
    050 n% = ASC(n$)
    060 s% = ASC(s$) XOR &H3F
    070 WHILE n% <> 0
    080 p$(i%) = RIGHT$(STR$(n% MOD 2), 1) + p$(i%)
    090 p$(i% + 10) = RIGHT$(STR$(n% MOD 2 XOR 1), 1) + p$(i% + 10)
    100 p$(i% + 20) = p$(i% + 20) + LEFT$(p$(i%), 1)
    110 q$(i%) = RIGHT$(STR$(s% MOD 2 + 1), 1) + q$(i%)
    120 n% = n% \ 2
    130 s% = s% \ 2
    140 WEND
    150 NEXT i%
    160 FOR i% = 0 TO 11
    170 c%(i%) = VAL(MID$(u$, i% + 1, 1))
    180 X% = X% + c%(i%) * (((i% + 1) MOD 2) + (3 * (i% MOD 2)))
    190 NEXT i%
    200 c%(i%) = (10 - X% MOD 10) MOD 10
    210 FOR i% = 1 TO 6
    220 l$ = l$ + p$(VAL(MID$(q$(c%(0)), i% + 1, 1)) * 10 + c%(i%))
    230 r$ = r$ + p$(c%(i% + 6))
    240 NEXT i%
    250 f$ = "606" + l$ + "06060" + r$ + "606"
    260 KEY OFF: SCREEN 2
    270 PRINT LEFT$(u$, 12) + RIGHT$(STR$(c%(12)), 1)
    280 GET (0, 0)-(13 * 8, 8), m%
    290 SCREEN 11: CLS
    300 REM PAINT (0, 0)
    310 PUT (15, 35), m%
    320 FOR i% = 1 TO 95
    330 b% = VAL(MID$(f$, i%, 1))
    340 LINE (20 + i%, 5)-(20 + i%, 25 + b%), SGN(b%) XOR 0
    350 NEXT i%
    360 WHILE INKEY$ = ""
    370 WEND
    380 KEY ON: SCREEN 0
    390 END
    400 DATA r,?,f,4,l,2,B,1,\,",",N,&,P,#,D,*,H,),t,%