CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

How can I modify em4015 driver to code RFID without CCP2

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
unisaco



Joined: 03 Dec 2012
Posts: 6

View user's profile Send private message Yahoo Messenger

How can I modify em4015 driver to code RFID without CCP2
PostPosted: Mon Dec 03, 2012 11:37 am     Reply with quote

Hi everybody,
So far, I succeeded when made a RFID 125 khz project with em4095 driver (hardware made by me).
My project: use RFID to open the door. The ID number of tag will be stored on EEPROM of PIC. When somebody scan their tag, this tag value will be compared with EEPROM value => open door or not
For my project, I just only use 6 PIN: 4 for EM4095, 1 for speaker and the last one for control Relay.

First one, I bought PIC 16F628 to communicate with EM4095 IC, but when Compiled, I got many error message such as:
Undefined indetifier CCP_2
It mean PIC 16F628 is only has 1 CCP. So I replaced this PIC by 16F877A and my Project worked perfectly.
But the cost for 16F877 in my country is so higher than 16F628 (maybe higher a half of cost). Beside, with 16F877A, there is so many pin I/O not yet be used => waste and can make noise to MCU
----------------
So, anybody who already modified em4095 driver, to use for PIC with just only one CCP, can you show me this code ? or can you teach me how to do that ? So many thanks if you can provide code sample for me. I think it also helpful for everyone.
---------------
Thank you for reading, hope someone reply soon ^^ Wink
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Mon Dec 03, 2012 12:56 pm     Reply with quote

There are many low cost MCU with 2 CCP, I find them using device selector in Microchip site where you can search a device using customizing
criteria according to your needs.

http://www.microchip.com/ParamChartSearch/chart.aspx?branchID=1024&mid=10&lang=en&pageId=74

Be aware to mark option "Show ALL Specs" in order to get visible all the parameters on screen.


Humberto
unisaco



Joined: 03 Dec 2012
Posts: 6

View user's profile Send private message Yahoo Messenger

PostPosted: Mon Dec 03, 2012 7:28 pm     Reply with quote

Thanks Humberto ^^
I have another question. Although I don't have any PIC 16F88x (16F882 / 16F883 / 16F887 ...) But when I try using those PIC with em4095 driver => compile hex file OK Cool Question
Base on Microchip Website, 16F883 has:
1 -CCP 1 -ECCP 10-bit PWM resolutions
It mean this PIC just only one CCP. So why I don't meet any error message like: Undefined indetifier CCP_2 when I compile RFID project.
Anybody who already tested em4095 driver with PIC 16f88x ? Is it ok right ?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Dec 03, 2012 7:56 pm     Reply with quote

Quote:
It mean this PIC just has only one CCP.

Not true.

Read the 16F883 data sheet. Both CCP1 and CCP2 can do the ordinary
CCP function. That's all you need for em4095.c, so it will work OK:
Quote:

11.0 CAPTURE/COMPARE/PWM MODULES (CCP1 AND CCP2)

This device contains one Enhanced Capture/Compare/
PWM (CCP1) and Capture/Compare/PWM module
(CCP2). The CCP1 and CCP2 modules are identical in
operation, with the exception of the Enhanced PWM
features available on CCP1 only.

CCP1 has additional optional features available, but they are not
needed for em4095.c.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group