Shop OBEX P1 Docs P2 Docs Learn Events
AM and FM Transmitters - Page 3 — Parallax Forums

AM and FM Transmitters

13»

Comments

  • purplemonkeypurplemonkey Posts: 89
    edited 2012-08-10 11:06
    Where do you connect to ground with resistors? Do you mean from aerial?
  • PublisonPublison Posts: 12,366
    edited 2012-08-10 11:09

    Golly gee. That doesn't sound like 2m_fm_modulation1.spin.
  • purplemonkeypurplemonkey Posts: 89
    edited 2012-08-10 11:14
    wonder if my prop chip is fried? but surely if it was i wouldn't be able to program it would i?
  • PublisonPublison Posts: 12,366
    edited 2012-08-10 11:19
    wonder if my prop chip is fried? but surely if it was i wouldn't be able to program it would i?

    Go back through the PEK Education Labs, and see if you can blink a LED on each pin. That will tell you if the Propeller is working. Run through the whole lab and you will understand much of what is being discussed here.
    '
  • purplemonkeypurplemonkey Posts: 89
    edited 2012-08-10 11:26
    Ok, but in the meantime can you see in that file how to change broadcast pin?
  • PublisonPublison Posts: 12,366
    edited 2012-08-10 11:53
    Can you take a guess on the PIN number from this code? :)

    I think it's time to hit the books. :)
      _clkmode = XTAL1 + PLL16X
      _xinfreq = 5_000_000
    
    
      { FFFF_FFFF / (CLKFREQ / (80Mhz / PLL16)) }
      c80mhz = %0001_0000__0000_0000__0000_0000__0000_0000
      { FFFF_FFFF / (CLKFREQ / (100Mhz / PLL16)) }
      c100mhz = %0001_0100__0000_0000__0000_0000__0000_0000
      { FFFF_FFFF / (CLKFREQ / (140Mhz / PLL16)) }
      c140mhz = %0001_1100__0000_0000__0000_0000__0000_0000
      { FFFF_FFFF / (CLKFREQ / 6.550Mhz) }
      c6p550mhz = 351_650_447
      { FFFF_FFFF / (CLKFREQ / 6.500Mhz) }
      c6p500mhz = 348_966_092
    
    
    
    
    PUB Main | cog
      VCFG := %10 << 29 + COGID << 23 + %1000_0000            'set for broadcast aural on pin 7 using this COG
    
    
      CTRB:=%00001_111 << 23        'setup the broadcast PLL internal 16x
      FRQB:=c80mhz                 'start the PLL
    
    
      PlayWAV                       'play
    
    
    PUB PlayWAV | p, time, x
      DIRA[7]~~
      CTRA:=%0001_011 << 23         'setup internal PLL 1x
    
    
      x:=clkfreq/11025              'sample rate
      repeat
        p := @beback + 44
    
    
        time := cnt
        repeat while p++ < @end
          FRQA := c6p500mhz + byte[p] << 14                  'modulate carrier and amplify the sample
          waitcnt(time += x)
    
    
        waitcnt(clkfreq + cnt)
    
    
    DAT
    
    
    beback byte
    File "expectu.wav"
    end byte 0
    
    
    
  • purplemonkeypurplemonkey Posts: 89
    edited 2012-08-10 12:05
    I'm guessing it's pin 16 or 7 but I tried to change it and kept getting unknown object error
  • mstrammstram Posts: 49
    edited 2016-04-29 20:28
    How are CTRA and CTRB interacting to modulate the (audio) signal ?

    Is it just the fact that they are both using the same transmit pin ?

Sign In or Register to comment.