PDA

View Full Version : PIc 16F639 AFE



Destovi
- 12th March 2008, 20:54
has anyone worked with this function of this PIC I want to transmitt some data at this low frequency and I was just wondering if anyone has attempted this and could offer some assistance

thanks

Michael

Bruce
- 12th March 2008, 23:22
The AFE front-end on this device really awesome. Download the docs & source code from
Microchip for their PKE system. Full schematics with source code to get you started.

I can't share what I'm doing with this at present since it's for someone else, but I can
tell you it's very simple with PBP, and pretty awesome stuff once you get the hang of it.

If you need transponder coils, check with coilcraft.com. They sell directly to the user, and
normally have plenty in stock. Get some fresh calculator batteries, and be prepared for a
lot of math..;o}

Destovi
- 13th March 2008, 00:59
hello Bruce, thanks for your reply I am glad to hear that this AFE function is a useful function.

I don't mean to bother you but I have a few questions with this project. I am hoping to design my own PKE system, my plan is to create the base station with only the 125 kHz transmitter/receiver as I don't need the range of the UHF.

I am looking at the schematic of the transponder, I am guessing that I don't need to construct the "data_out" circuit as it seems to be for UHF transmission. Are any of the other circuits shown on this schematic not usefull for Low Freq talk back?

I also am looking at the source code file from microchip. I am familiar with mplabs and the different code platforms, but in the source file folder there are about 20 different asm files, do I need all of them and if so how do I implement all of them?

sorry this is turning into an essay, on the base station side once again all I need is the low frequency parts. So I won't need the LCD shown in the schematic or the circuit connected to "U4" as that is UHF I believe, I am not sure if there are any other parts I can omit in this schematic. And my previous question about the abundance of source codes applies to this part as well.

I am sorry to bother you with all these questions if you can't answer them due to the project you are working on now or you simply don't have time that is fine, but if you could provide me with some answers to these questions to get me up and running that would be great. I am hoping to build some circuits tomorrow and possibly get started on programming this weekend.

Thanks again Bruce

Bruce
- 13th March 2008, 12:05
If you're not using the UHF options, then just leave out the UHF portions of the circuits
shown.

The code examples just assume you're using the UHF options, but there are sections
of code in the PKE transponder code example that show how to configure the AFE you
will want to look at.

The 16F639 is actually a 16F636 with an MCP2030 AFE built-in. So if you're only interested
in using the LF Talk-Back, you might want to start with the MCP2030 data sheet, and work
your way up from there. The AFE section of the 16F639 data sheet tells you how the LF
Talk-Back works. Look at 11.2 Modulation Circuit.

Once you understand how this works, you'll know exactly which parts of the circuits you'll
need.

Destovi
- 14th March 2008, 03:34
I sent an email to the email account you had listed in your signature page just asking a few more questions, I hope that is allright

thanks again

Destovi
- 14th March 2008, 14:52
Sorry Bruce I was a bit too hasty in giving up last night, I was just getting a bit frusterated as the UHF was called, it felt like a hundred times, in every file. I am currently tracing my way through the transponder_demo code and I am looking at the main function, when a receive event has occured it calls the message handler function. I was looking through there and all of the LF talkback functions were commented out, and replaced with UHF transmission ones. I believe reversing this will enable the LF talkback portion of the code. The main function then checks to see if any buttons have been pressed, I won't be implementing these functions so I don't think the button_handler code will be an issue. The main function then puts the device in idel mode which I believe is just the UHF portion, but as I am not using this It shouldn't be a problem. So as far as the transponder code goes I believe I have a better understanding of that now.

near the top it says:
#define REC_EVENT 4; The number of the PORTA pin the LFDATA output is connected to
on my schematic lfdata is connected to RC3 not to porta I think porta is used for the UHF but not 100% sure

This might be a stretch now but if I make these changes so that the return message is sent by LF instead of RF, can I just leave all the rest of the code the same? (not going through line by line and removing all of the RF implementations or is that going to jam the program?)

sorry again for my email last night it was sent in haste, I do want to understand how this PKE system works I just need a bit of guidance