NS73M fm radio trasmitter


Closed Thread
Results 1 to 22 of 22

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Posts
    18


    Did you find this post helpful? Yes | No

    Default

    Joe,

    I appreciate all the help and suggestions.

    Here is my code, a schematic, and a photo of my setup.

    I have tried all kinds of things, and my underlying suspicion isnt that I am doing something wrong. I am just not finished with what is right.

    I have rewritten my code more similar to Boris' snippets, and his seems to work, heh. But mine still does not. Yet.


    My Configs are set as follows:

    __config _HS_OSC & _WDT_ON & _LVP_OFF & _CP_OFF & _WRT_OFF & _CPD_OFF & _BODEN_ON & _PWRTE_ON

    Code:
    '''''''''''''''''''''''''''''''''''''''
    '''''''''''''''''''''''''''''''''''''''
    ''   NS73M Control Test Environment  ''
    '''''''''''''''''''''''''''''''''''''''
    '''''''''''''''''''''''''''''''''''''''
    ' We are using a PIC 16F877A
    '
    ADCON1=%00000111
    Include "ModeDefs.Bas"
    DEFINE OSC 4
    TRISB=0
    DEFINE LCD_DREG	PORTA	'Define PIC port used for LCD Data lines
    DEFINE LCD_DBIT	0		'Define first pin of portb connected to LCD DB4
    DEFINE LCD_RSREG PORTA	'Define PIC port used for RS line of LCD
    DEFINE LCD_RSBIT 4		'Define Porta pin used for RS connection
    DEFINE LCD_EREG	PORTB	'Define PIC prot used for E line of LCD
    DEFINE LCD_EBIT	0		'Define PortB pin used for E connection
    DEFINE LCD_BITS	4		'Define the 4 bit communication mode to LCD
    DEFINE LCD_LINES 2		'Define using a 2 line LCD
    
    NS_CK VAR PORTB.1	' I2C Clock Pin
    NS_DA VAR PORTB.2	' I2C Data Pin
    NS_CON VAR BYTE		' I2C Device (the NS73M) Control Address/ReadWrite Value
    NS_REG VAR BYTE		' NS73M Register Address
    NS_VAL VAR BYTE		' NS73M Register Value
    
    NS_CON = %11001100	' Value of NS73M Address, with "Write" Bit
    
    NS_REG=$0E:NS_VAL=$05:GOSUB WRITEDAMMIT ' Reset the chip right off...  They said to.
    NS_REG=$01:NS_VAL=$B4:GOSUB WRITEDAMMIT ' Pilot On, Forced Subcarrier On
    NS_REG=$02:NS_VAL=$07:GOSUB WRITEDAMMIT ' Full (2mw) Power, Unlock Detect On,
    NS_REG=$03:NS_VAL=$58:GOSUB WRITEDAMMIT ' Lower Byte of Freq Address in Hex
    NS_REG=$04:NS_VAL=$2A:GOSUB WRITEDAMMIT ' Upper Byte of Freq Address in Hex
    NS_REG=$08:NS_VAL=$18:GOSUB WRITEDAMMIT ' CEX Band = 3 (For Now. Different Bands for Different Freq's)
    NS_REG=$00:NS_VAL=$A1:GOSUB WRITEDAMMIT ' Xmtr RF On, 200mv input level for 100% Modulation
    NS_REG=$0E:NS_VAL=$05:GOSUB WRITEDAMMIT ' Another Reset
    NS_REG=$06:NS_VAL=$1E:GOSUB WRITEDAMMIT ' Set the Charge Pumps, whatever Charge Pumps are...
    GOTO LCDSTUFF
    
    WRITEDAMMIT:
    I2CWRITE NS_DA,NS_CK,NS_CON,NS_REG,[NS_VAL] ' I2CWRITE Command. Supposed to work.
    PAUSE 10 ' Don't know if this is necessary, but everyone writing to EEProms use it, I figured it couldn't hurt.
    RETURN
    
    LCDSTUFF:
    LCDOUT $FE, 1
    LCDOUT $FE, 2
    PAUSE 500
    LCDOUT $FE, $80
    LCDOUT "  Are We" 
    LCDOUT $FE, $C0
    LCDOUT "Transmitting ??"
    PAUSE 1000
    
    THEEND:
    END






    I know the chip in the schematic says "16F84AP". disregard that. In reality, it is a 16F877A; the pin connections are the same still.

    Any ideas would be a godsend. Thanks!

    Cheers!

    SmugWimp
    Last edited by SmugWimp; - 8th February 2009 at 04:53.

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Have you pulled up the IIC pin #8
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  3. #3
    Join Date
    Jan 2009
    Posts
    18


    Did you find this post helpful? Yes | No

    Default

    It does not have a resistor on it, but "IIC" on the NS73M Board is tied to +3.3v, yes.

    Both the I2C Clock and Data lines are pulled to +3.3v with 1Kohm resistors. I have tried larger values, and it makes no difference.

    cheers!

    SmugWimp
    Last edited by SmugWimp; - 8th February 2009 at 12:27.

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    XT_OSC might be better for a 4MHz crystal, and BODEN_OFF would help when operating
    below the Brown-Out Reset Voltage, but I think the primary show-stopper is trying to run
    the non LF version 877A below the minimum operating voltage.

    The LF part can operate on 2 to 5.5V. The non LF needs 4 to 5.5V. Check the Electrical
    Specifications section in your datasheet.

    Brown-Out reset on the non LF part can be anywhere from 3.65V, 4.0V or 4.35V.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  5. #5
    Join Date
    Jan 2009
    Posts
    18


    Did you find this post helpful? Yes | No

    Default

    Bruce,

    Thanks for the info. Hadn't thought of that.

    I did a slight rewire to provide +5v to LCD and 877a, and +3.3v to NS73M only.

    The 1K Pull up resistors for I2 Data/Clock are also at +5v.

    XT_OSC and BODEN_OFF have been implemented on my fuses.

    However, still no success.

    I appreciate everyone's support and suggestions!! I will keep plugging away. Gotta be me... something...

    Cheers!

    SmugWimp
    Last edited by SmugWimp; - 9th February 2009 at 07:37.

  6. #6
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Run the PIC at 5V and just build this simple interface circuit shown in section 2.3.

    http://www.standardics.nxp.com/suppo...df/an97055.pdf
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  7. #7
    Join Date
    Jan 2009
    Posts
    18


    Did you find this post helpful? Yes | No

    Default

    Bruce,

    Cool!!! Funny, I saw this circuit at Mike Yancy's Website while snooping around for stuff. I thought it was because he was running an Arduino. Guess that points out more ignorance on my part!

    I'll have to run into Akihabara to get these parts; nothing like that in my stock. I'll let you know what I find, but I really really appreciate the heads up on this!!

    Cheers!

    SmugWimp

Similar Threads

  1. Car radio (Car radio and electronics support forum)
    By freewillover in forum Forum Requests
    Replies: 1
    Last Post: - 1st July 2009, 20:41
  2. FM Radio transmitter PIC Interface.
    By koossa in forum Off Topic
    Replies: 2
    Last Post: - 30th November 2008, 10:05
  3. Replies: 5
    Last Post: - 6th September 2007, 05:59
  4. Newbie radio link issue
    By George in forum mel PIC BASIC Pro
    Replies: 31
    Last Post: - 28th February 2007, 05:28
  5. LPRS/miniature radio modules
    By fowardbias in forum Off Topic
    Replies: 1
    Last Post: - 20th September 2005, 02:03

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts