The NS73M works without problem, but I could not read the registers. I can write them, so I can set the frequency and all parameter, but no read...
The NS73M works without problem, but I could not read the registers. I can write them, so I can set the frequency and all parameter, but no read...
Not trying to cheat, but if you would not mind sending me a couple of lines of your sample code so I will have something to work with starting out I would appreciate it.
Reading the registers of the NS73M? I guess my first question is why? I am not sure what the advantage or use would be.
Cheers!
SmugWimp
This is my code:
Code:EEPROM 0,[3,232,0,0] 'FREQ.BYTE1 FREQ.BYTE0 PW SENS READ 0,FREQ.BYTE1 READ 1,FREQ.BYTE0 READ 2,PW READ 3,SENS SETUP: REG=$0E:VAL=$05:GOSUB SCRIVI ' Software reset REG=$01:VAL=$B4:GOSUB SCRIVI ' Pilot on, forced subcarrier REG=$02:VAL=$07:GOSUB SCRIVI ' 2 mW power, Unlock detect on REG=$08:VAL=$1A:GOSUB SCRIVI ' CEX = Band 2 REG=$00:VAL=$A1:GOSUB SCRIVI ' Pwr on, 200 mV audio for 100% modulation REG=$06:VAL=$1E:GOSUB SCRIVI' Set internal charge pumps SCRIVI: I2CWRITE DA,CK,%11001100,REG,[VAL] RETURN
Boris,
Much Appreciated! Not sure if I can do anything about reading registers, I am just beginning. But I can get anything to work, I will post it here.
Cheers!
SmugWimp
Hi Boris!
Got my chips in today from Sparkfun, and started reading the datasheet on the NS73M a bit more.
It seems that although the NS73M can read and write, the only thing I can see is that it is 'writing' is an ACK for any commands sent, but that seems to be about the only information that I can find in the datasheet.
If you were (like me) planning to read the NS73M to see what parameters it is currently set at then we may end up going another method.
I suspect I will end up using a "set" of defaults, and then use the PIC to read/modify/write those settings in the EEPROM as needed.
Let me know if you see something different!
Cheers!
Alex
I guess I am missing some elementary issues, but I cannot seem to figure out why I cannot get this to work.
Here is a sample of my code:
At first I was trying this with a 16F84A, and moved to a 16F877A just to make sure there was nothing wrong with my chips. I get the same results; nothing.Code:REM Above this is just LCD and button setups... NS_CK VAR PORTC.1 NS_DA VAR PORTC.2 FREQ VAR WORD 'REM Consisting of FREQ.1 and FREQ.2 (Hi/Lo Byte) MYREG VAR BYTE 'REM Register of NS73M MYVAL VAR BYTE 'REM Value for register in NS73M MYCON VAR BYTE 'REM Control Value for NS73M START: 'REM The Theory is that we setup all parameters, then turn it on. MYCON = %11001100 'REM Setup Control Address for NS73M PAUSE 100 'REM Breathe a moment; let the chip get settled... I2CWRITE NS_DA,NS_CK,MYCON,$0E,[$05] 'REM SOFTWARE RESET NS73M Chip PAUSE 100 I2CWRITE NS_DA,NS_CK,MYCON,$01,[$B4] 'REM Pilot On, Subcarrier On PAUSE 10 I2CWRITE NS_DA,NS_CK,MYCON,$02,[$07] 'REM 2mw Power, Unlock Detect ON PAUSE 10 I2CWRITE NS_DA,NS_CK,MYCON,$08,[$1A] 'REM CEX Band 2 PAUSE 10 'REM Again, theory is that I am transmitting on 88.5MHz, as per datasheet... I2CWRITE NS_DA,NS_CK,MYCON,$03,[$58] 'REM Frequency; Lower Byte PAUSE 10 I2CWRITE NS_DA,NS_CK,MYCON,$04,[$2A] 'REM Frequency; Upper Byte PAUSE 10 I2CWRITE NS_DA,NS_CK,MYCON,$00,[$A3] 'REM Power, 200mv Audio, 75us PE PAUSE 10 I2CWRITE NS_DA,NS_CK,MYCON,$0E,[$05] 'REM SOFTWARE RESET NS73M PAUSE 10 I2CWRITE NS_DA,NS_CK,MYCON,$06,[$1E] 'REM Charge Pumps PAUSE 10 I2CWRITE NS_DA,NS_CK,MYCON,$0E,[$05] 'REM SOFTWARE RESET NS73M PAUSE 10 REM Just a note to let me know it got through the code unscathed... LCDOUT $FE, 1 LCDOUT $FE, 2 PAUSE 500 LCDOUT $FE, $80 LCDOUT "Transmitting?" LCDOUT $FE, $C0 LCDOUT " supposedly..." PAUSE 1000 END
This is my first attempt at I2C communications, so I am not certain what, if any, feedback I can expect. My current feedback is nothing works, lol!
Any pointers on where my code is lacking, or erroneous, would be greatly appreciated!
Cheers!
SmugWimp
Hold the phone folks; I think I may have a hardware issue. I almost hope so, anyway. heh.
BBIAF...
SmugWimp
Bookmarks