Jump to content
43oh

Recommended Posts

I've started to build a simple FM radio. It is based in a small module with a TEA5767. The code it's pretty basic for now, I'm just sending a fix frequency as part of the initial tests.

 

#include 
#include "USI_I2CMaster.h"

int StatusCallback(unsigned char c)
{
return TI_USI_EXIT_LPM; // Exit active for next transfer
}

void main( void )
{
// Stop watchdog timer to prevent time out reset
WDTCTL = WDTPW + WDTHOLD;

BCSCTL1 = CALBC1_16MHZ; // Set range
DCOCTL = CALDCO_16MHZ; // SMCLK = DCO = 1MHz

/* Initialize USI module, clock ~ SMCLK/128 */
TI_USI_I2C_MasterInit(USIDIV_7+USISSEL_2+USICKPL, StatusCallback);

unsigned char TxDataConfig[5] = {0x2E,0xBA,0x10,0x10,0xC0};

/*Write data, configuration register
TI_USI_I2CWrite(SlaveAddress, Length, Multi, TxData) */
__disable_interrupt();
TI_USI_I2CWrite(0x60, 5, 0,TxDataConfig);
__bis_SR_register(LPM0_bits + GIE);

TI_USI_I2CStop();

}

 

You'll find more information here.

Link to post
Share on other sites

Thanks for sharing this. A good place for buying TEA5767 is suntekstore.com -- about $10 for 10 pcs (after a $2 off coupon), or one for $2.16, with free shipping. Everything on ebay is more expensive. I ordered a couple to play with.

 

Does anyone know of a similar chip that can also do AM?

Link to post
Share on other sites
I like your documentation.

Thanks! the main reason for all that writing is just to have an excuse to write in English and practise my grammar/spelling/vocabulary etc.

 

A good place for buying TEA5767 is suntekstore.com

I haven't heard about that site, i will check it out. Is it reliable? Thanks.

Link to post
Share on other sites
I like your documentation.

Thanks! the main reason for all that writing is just to have an excuse to write in English and practise my grammar/spelling/vocabulary etc.

 

A good place for buying TEA5767 is suntekstore.com

I haven't heard about that site, i will check it out. Is it reliable? Thanks.

 

suntekstore.com is reliable and ships very quickly too -- about a week to the US.

 

They also have good coupons most of the time. See http://www.retailmenot.com/view/suntekstore.com. Unfortunately, they recently introduced a $15 minimum for the 12% off coupon -- I used it for buying a bunch of small items in the past.

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...