Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

prolem with atmega8 & em4095

Status
Not open for further replies.

ehsanax

Newbie level 1
Joined
Sep 4, 2011
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,292
I have problems with atmega8 and em4095 RFID driver.
this firmware and cicuit is unstable and very Sensitive to switching and aow read range(2cm).
my code and schematic is attached.
please help me.
thanks .

$regfile = "m8def.dat"
$baud = 9600
$crystal = 8000000
$hwstack = 40
$swstack = 40
$framesize = 40


'Make SHD and MOD low
Config Portd.4 = Output
Portd.4 = 0

Shd Alias Portd.5
Config Shd = Output
Shd = 0


Boogh Alias Portd.2

Config Boogh = Output
Boogh = 1
Wait 3
Boogh = 0



Dim Tags(5) As Byte 'make sure the array is at least 5 bytes
Dim J As Byte
Dim A As Byte

Config Hitag = 64 , Type = Em4095 , Demod = Pind.3 , Int = @int1

Print "kara2000(serial port test)"



On Int1 Checkints Nosave
Config Int1 = Change
Enable Interrupts



Do
' Print "Check..."

If Readhitag(tags(1)) = 1 Then
Print Chr(2); 'this will enable INT1
For J = 5 To 1 Step -1
'Print Hex(tags(j)) ; ",";
A = Tags(j) / 16
A = A + 48
Print Chr(a);
A = Tags(j) Mod 16
A = A + 48
Print Chr(a);

Next
Print Chr(0); 'CHECK SUM
Print Chr(0); 'CHECK SUM
Print Chr(13);
Print Chr(10);
Print Chr(3);
Waitms 1000
'Print
Else
'Print "Nothing"
End If
Waitms 500
Loop


Checkints:
Call _checkhitag
Return
 

Attachments

  • em4095-1.JPG
    em4095-1.JPG
    50.2 KB · Views: 39

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top