Gentlemen!
I got it work!! :smt026
[code:1:44773dd207]
' 100% working code
$regfile = "m128def.dat"
$crystal = 16000000
$baud = 19200
$baud1 = 19200
$hwstack = 100
$swstack = 130
$framesize = 100
Config Lcdpin = Pin , Db4 = Portc.4 , Db5 = Portc.5 , Db6 = Portc.6 , Db7 = Portc.7 , E = Portc.3 , Rs = Portc.2
Config Lcd = 16 * 2
Cls
Cursor Off Noblink
Dim Tags(5) As Byte , J As Byte , X As Byte
Rfid_mod Alias Porta.1
Rfid_mod_pin Alias Pina.1
Rfid_shd Alias Porta.2
Rfid_shd_pin Alias Pina.2
Config Rfid_mod_pin = Output
Config Rfid_shd_pin = Output
Reset Rfid_mod
Reset Rfid_shd
Waitms 100
Set Rfid_shd
Waitms 100
Reset Rfid_shd
Config Hitag = 64 , Type = Em4095 , Demod = Pine.4 , Int = @int4
On Int4 Checkints Nosave
Config Int4 = Change
Enable Interrupts
Cls
Locate 1 , 1 : Lcd "Ready"
Do
If Readhitag(tags(1)) = 1 Then
Locate 2 , 1
For J = 1 To 5
Lcd " " ; Hex(tags(j))
Next J
End If
Loop
End
Checkints:
Call _checkhitag
Return
[/code:1:44773dd207]
Thanks a lot. Sorry for stupid posts :oops:
Sincerely, Peter
↧