There is a TSB on keys. Hopefully you're still under warranty?
I noticed that the battery in my retarded flip out key was dieing slowly and it stopped working unless i was right on the car and pressed the unlock button multiple times. I went to walmart, took my key apart at the counter, put a brand new battery in it (#1620). Tried to unlock or lock car doors. nothing. pressed buttons multiple times. nothing. started car. tried buttons again. nothing. did the manual reprogram (door open, hit door lock/unlock, turned key 3 times and open/closed door 3 times). Doors locked and unlocked, but still nothing. took key apart and put the battery tester to it. battery has full charge. bent out the tangs on the battery contact and the board. put it back together and NOTHING! what is wrong with this stupid thing? also to note, it's the only key i have!!! thank you in advance for any ideas.
I took the car to Wray Mazda (of which I loathe) and told them what happened. The guy tried to do the ignition/door sequence. It didn't work. He told me that the remote was dead, but that if I purchased one from the parts department that he would program it for free. After reading all the posts about how if you have one key, then you will have to purchase the other through the dealership and have it programmed there, I thought it was a good idea to purchase one and have him program it, especially since he said he would do it for free... Well, $170 later I had my new fob. I handed it over to the guy. I envisioned him taking it away and hooking it to at computer or something. Nope. He sat down in my car and did the ignition/door sequence and programmed my new key fob while I stood there talking to him. No "forced" programming, just the ignition/door sequence. really?!? What a bunch of bs!