Jump to content
Fred

TRF7970A NFC booster now in eStore

Recommended Posts

Sir Fred, did you find out ?

 

I was trying to compile the examples from mspware: No chance ! Using CCS6 under Windows 7 with the TI compiler I get "code size exceeded" and using gcc I get 78 errors (loads of stuff not found). :(

 

F5529LP that is.

Share this post


Link to post
Share on other sites

@@OppaErich I did some tests on NFC readers. The DLP-7970ABP is no better or worse than other readers with a PCB antenna. DLP never mentioed it to me but they actually make a coil antenna that works much better I wrote it up here.

 

As part of my first project using the implant, I ported the example code over from the G2553 to the F5529. I expected it to be just a case of changing a few pin assignments and sorting out the clocking, but for some reason it took me quite a while. (Not helped by the fact that at one point I accidentally deleted the line that enabled the reader and didn't realise.) I'll post the ported code when I get it cleaned up a bit.

 

I'll write the project up here soon, but for now you'll find it on my blog. It uses the HID keyboard to unlock my work PC when I scan it.

http://0xfred.wordpress.com/2015/01/14/nfc-login-version-1-0/

Share this post


Link to post
Share on other sites

Hi @@Fred,

 i got Trf7970A last week i'm trying to work in Energia with msp430g2553 .the program given by the Texas instrument is working well in CCS (i tried it) but i want to work with that in energia and i have written the following code by taking this pdf as refrence (http://dangerousprototypes.com/forum/download/file.php?id=10030)

but its not working ..please help me ..looking forward for your help .thanks in advance

 
 
*******FOR ISO1443A nfc tag****
#include<SPI.h>

#define enable P2_2
#define CS P2_1
#define interrupt P2_0
#define CS_ENABLED digitalWrite(CS,LOW)
#define CS_DISABLED digitalWrite(CS,HIGH)

void setup()
{
  // put your setup code here, to run once:
  pinMode(CS,OUTPUT);
  pinMode(enable,OUTPUT);
  digitalWrite(enable,LOW);
  pinMode(interrupt,INPUT);
  SPI.setDataMode(SPI_MODE1);
  SPI.setClockDivider(SPI_CLOCK_DIV8);
  SPI.setBitOrder(MSBFIRST);
  SPI.begin();
  Serial.begin(9600);
}

void loop()
{
  // put your main code here, to run repeatedly:
 

   let();
}
void let(void)
{
  CS_ENABLED;
  Write(0x83);
  CS_DISABLED;
  CS_ENABLED;
  Write(0x09);
   Write(0x31);
  CS_DISABLED;
  CS_ENABLED;
  Read(0x49);
  CS_DISABLED;
  CS_ENABLED;
   Write(0x01);
   Write(0x88);
  CS_DISABLED;
   CS_ENABLED;
  Read(0x41);
  CS_DISABLED;
   CS_ENABLED;
   Write(0x00);
   Write(0x20);
  CS_DISABLED;
  CS_ENABLED; 
  Read(0x40);
  CS_DISABLED;
  CS_ENABLED;
 Write(0x01);
 Write(0x88);
CS_DISABLED;
CS_ENABLED;
 Write(0x8F);
 Write(0x90);
 Write(0x3D);
 Write(0x00);
 Write(0x0F);
 Write(0x26);
CS_DISABLED;
delay(100);
CS_ENABLED;
 Write(0x6C);
Read(0xC0);
Read(0x3E);
CS_DISABLED;
CS_ENABLED;
 Write(0x5C);
Read(0x02);
CS_DISABLED;
CS_ENABLED;
 Write(0x7F);
Read(0x04); 
Read(0x00);
CS_DISABLED;
CS_ENABLED;
 Write(0x8F);
CS_DISABLED;
CS_ENABLED;
SPI.transfer(0x4F);
Read(0x7F);
CS_DISABLED;
delay(20);
CS_ENABLED;
 Write(0x8F);
 Write(0x90);
 Write(0x3D);
 Write(0x00);
 Write(0x20);
 Write(0x93);
 Write(0x20);
CS_DISABLED;
delay(5);
CS_ENABLED;
 Write(0x6C);
Read(0xC0);
Read(0x3E);
CS_DISABLED;
CS_ENABLED;
 Write(0x5C);
Read(0x05);
CS_DISABLED;
CS_ENABLED;
 Write(0x7F);
Read(0xCD); 
Read(0x88); 
Read(0x77); 
Read(0x66); 
Read(0x00);
delay(10);
CS_DISABLED;
CS_ENABLED;
 Write(0x6C);
Read(0x00); 
Read(0x3E);
CS_DISABLED;
CS_ENABLED;
 Write(0x8F);
CS_DISABLED;
CS_ENABLED;
 Write(0x4F);
Read(0x7F);
CS_DISABLED;
}

void Read(byte data )
{
  Serial.print(SPI.transfer(data));
}

void Write(byte data)
{
 SPI.transfer( data);
} 

Share this post


Link to post
Share on other sites

Should've read the doc first. There were precompiled binaries for F5529 too. Had to download a flashing tool too because there is some kind of new FET on the F5529LP too. The adhesive tag that came with the booster pack works fine but the Mifare 1k tags I have and NFC to my phone does not. With these the GUI goes into a loop: Tag found - tag removed.

 

Cheers,

Stephan

Share this post


Link to post
Share on other sites

@@led I don't use Energia so can't help with that. Sorry.

 

@@Oppa / @@OppaErich There are precompiled binaries for the F5529 if you want to use NFCLink but that didn't seem to suit what I wanted to do at all. I found it odd that the TRF7879ABP_Demo code was only available for the G2553, as the F5529LP and the booster pack are actually sold as a bundle. Next time I'm at a PC I'll upload the ported code. Nothing ground breaking, but may save others some time.

Share this post


Link to post
Share on other sites

@@Fred thanks for your reply

i have tried TRF7970ABP_Demo code with G2553 in CCS but i would like to use it with CC3200 LP .I tried to change the headers but to my knowledge its a big challenge .please can u suggest me any way that TRF7970 will works with CC3200 (no issues if it works in CCS )

Share this post


Link to post
Share on other sites

 If I had a CC3200 then I'd give it a go, but unfortunately I don't. Just like with the F5529 it should in theory just be a case of sorting out:

  • the clock setup, so that timers and SPI are running at about the same speed as on the G2553.
  • the pin assignment - even between the G2553 and the F5529 the booster pack pins are assigned to different ports.
  • the SPI communication between the microcontroller and the launchpad many need some particular attention, but should be the same.

The code is just C that should port over without any problems. However, I found that it took me longer than I expected. I'll post my rough and ready F5529 version later today when I get a chance and that should at least show you the areas that I had to change.

Share this post


Link to post
Share on other sites

@@Fred There's code in MSPWare too but that did not compile using CCS6 (code size limit). NFC did not show any errors but when I placed the phone on the BP this 'found-removed' loop started again, no sounds from the phone.

 

Rather tricky this NFC stuff it seems. The goal is to send data to the phone and do the presentation there. Maybe I give up on that and go BT.

 

@@led Sorry, no Energia code here.

 

 

 

@Oppa / @OppaErich 

Oppa is my good old account and OppaErich is it when I log in via Google login.  :unsure:

Share this post


Link to post
Share on other sites

Someone just needs to hunker down and make it easy. TI has all their code but it's probably licensed restrictive or the examples only work right on a couple chips.

(I'd love to do it but I have too much on my plate atm)

 

Sent from my Galaxy Note II with Tapatalk 4

Share this post


Link to post
Share on other sites

I must admit I was a bit disappointed at the quality and clarity of the examples.

 

The stuff in MSP430Ware is NFCLink, which uses some precompiled libraries and as far as I could tell only allowed you to have the F5529 acting as a slave over UART or I2C to another device - e.g a PC. I wanted the MSP430 itself to take action when a tag was detected, not another device.

 

The TRF7970ABP_Demo code seemed to neither insulate you from the complexity of the TRF7970 or to explain it. Lots of details of the TRF7970A and NFC implementation in general (e.g Anti-collision) bleed right through into the calling code.

 

All I wanted to do was: Wait for a tag. Read the ID, If ID=x then... Let's be honest that's pretty much what 90% of any RFID/NFC code is going to be doing but it really wasn't clear at all.

Share this post


Link to post
Share on other sites

@@Fred ur my last hope please help me to solve this problem 

 

 

in "Modulator and SYS_CLK Control Register (0x09)"

 

what should be the value to be written

 

in TRF7970_demo---> i found ;0x01 it means 100%ask and no sysclk

in some pdfs ---> i found ;0x31 it means 100%ask and 13.5MHZ default clock

 

should we have to provide 13.5MHZ from microcontroller or it self (TRF7970) has an internal 13.5MHZ clock please help me..

Share this post


Link to post
Share on other sites

If I remember correctly the DCO is used to drive a few things - how often it checks for a tag, the SPI clock speed and timeouts for some communications. I'm not sure any of these things are really critical.

 

Easiest way is to see if you got the DCO right is to check that the LED flashes (when it checks for a tag) about the right frequency. To check SPI speed you'd really need a logic analyser, but if you don't change anything drastic in the SPI setup and the LED flashes at the right speed then the SPI will probably be the right speed too.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...