View previous topic :: View next topic |
Author |
Message |
menipos
Joined: 02 Jun 2008 Posts: 2
|
PIC16F636 with keeloq |
Posted: Mon Jun 02, 2008 1:21 am |
|
|
I want to program the PIC 16F636 with CCS and Keeloq support. Microchip’s website says that the CCS compiler support Keeloq but in the CCS official site doesn’t write anything.
I am programmer in C30 and C18/C17 I can’t write Assembly.
I want full support of the compiler for :
1. 16F636 and Keeloq (I can’t change PIC because the decoder is in the chip and PCB is ready we can’t change it)
2. The syntax commands and some notes how to use keeloq for PIC16F636
3. Support for MPLAB IDE (I know CCS have plug-in module)
4. ICD2 or Real ICE 2000 and MP3. (I can’t change hardware because of my boss)
FROM THIS PROJECT DEPEND MY WORK.
Thank you |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Jun 02, 2008 12:08 pm |
|
|
The 16F636 data sheet says this:
Quote: | PIC12F635/PIC16F636/639
10.0 KEELOQ ® COMPATIBLE CRYPTOGRAPHIC MODULE
To obtain information regarding the implementation of
the KEELOQ module, Microchip Technology requires
the execution of the “KEELOQ ® Encoder License
Agreement”.
The “KEELOQ ® Encoder License Agreement” may be
accessed through the Microchip web site located at
www.microchip.com/KEELOQ. Further information may
be obtained by contacting your local Microchip Sales
Representative. |
You need to get a license from Microchip. Then they
will send you the documentation for the Keeloq registers
in the 16F636. Then you can use CCS (or any compiler)
to access the Keeloq registers. |
|
|
menipos
Joined: 02 Jun 2008 Posts: 2
|
|
Posted: Tue Jun 03, 2008 4:06 pm |
|
|
I have license from Microchip and the files but the problem isn't typical. I want to know if CCS support Keeloq with out writing Assembly just C for the PIC16F636. The files of microchip is for Mpasm, C18, C30. I want to know if the code of CCS for Keeloq is look like C30,C18 (that means for example you give automatically the manufactory code just with one function and then you can save it into EEPROM.
Part of Example code
files
RXI.C interrupt driven receiver
KEYGEN.C KEELOQ key generation routines implementing
Normal Mode
FASTDEC.C KEELOQ decrypt routine
MEM-87X.C PIC16F87X EEPROM driver
TABLE.C transmitters table memory management
(linear list)
MAIN.C the actual initialization and main loop
FOR example read AN744 : Inside have source code for CCS but for other PICs.
Just i Want to know if CCS support PIC16F636 with Keeloq. Only this.
I never wrote code for keeloq in my life and I must finish the project in 3 months. CCS and C Compilers is the easy way for me. Now i play with Evolution Kit II.
All the other programmers are Assemblers and I don't know them but depends who is faster and because i use C I am the faster. But know they give me the keeloq if I had 18F and external decoder is easy for me but know I have problem an is my first job and I take 1000euro per month with out insurance.
Thank you for your help and your Understanding |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Jun 03, 2008 4:23 pm |
|
|
Quote: | FOR example read AN744 : Inside have source code for CCS but for other PICs. Just i Want to know if CCS support PIC16F636 with Keeloq. |
AN744 is written for a 16F872, and it only does a Keeloq decoder, and
it does it entirely in software. The 16F872 doesn't have any hardware
module inside it to do Keeloq encoding or decoding.
You want to use the Keeloq hardware module inside the 16F636.
I don't know if CCS has functions to support this. You need to email
CCS support and ask them.
Ask them if they have functions available to support the hardware
Keeloq module inside the 16F636. Tell them you have a license
from Microchip for Keeloq. Tell them your CCS user reference number
so they know you own the compiler. If you are lucky, maybe they
have the functions. If not, you will have to convert sample code from
some other compiler to CCS, or use the other compiler. |
|
|
salmo Guest
|
|
Posted: Mon Oct 27, 2008 4:46 am |
|
|
Using the hardware Keeloq is very simple and doesn't require any support from the compiler: it consist in just reading / writing banked registers. If you map them you can see them as normal variables.
Hope this helps. |
|
|
RLScott
Joined: 10 Jul 2007 Posts: 465
|
|
Posted: Mon Oct 27, 2008 5:35 am |
|
|
salmo wrote: | Using the hardware Keeloq is very simple and doesn't require any support from the compiler: it consist in just reading / writing banked registers. If you map them you can see them as normal variables.
Hope this helps. |
That's right. Using CCS functions for everything seems to make people forget that anything you can do with assembler you can do in C with the CCS compiler just by using the #byte directive to define register addresses and then using standard C assignment statements. I do that all the time, even when the relevant CCS functions exist, simply because I want to do things more efficiently or more understandably or different is some other way. So do not be afraid to talk directly to the registers for Keeloq or anything else. _________________ Robert Scott
Real-Time Specialties
Embedded Systems Consulting |
|
|
|