RFID interfacing with atmega162 gives garbage on lcd

sevenfold4

Joined Jan 12, 2015
80
Thanks Man , I finally got it working,
I go through datasheet. And set my lFuse=FF(for selecting external clock >8Mhz)
hfuse=99(default value) eFuse=ff(default value)
and also included
#define F_CPU 12000000UL

Now my controller is working on 12Mhz clock. Also reading my RFID tag and displaying on lcd.
But I am also getting garbage before and after tag. but I am able to get 100% correct tag.

If you know who could i remove garbage then tell me please.
I am glad to hear you got it working. Such random thrash could still have something to do with the frequency. But at this time, i am not sure.
 

spinnaker

Joined Oct 29, 2009
7,830
If you know who could i remove garbage then tell me please.
You have both the hardware and software a big advantage over someone trying to help on the internet.

Use some basic trouble shooting techniques. Set a breakpoint where you output your first character and then see if that character gets to the display by using a scope, logic probe etc. You just might be sending garbage.

LCDs also require a startup time. I would give it a good 50ms after power up and initializing your clock before sending anything to the display,

Also check your delays. The very best tool for this is a scope or logic analyzer. You can make sure your delay is what you think it is,
 
Top