Connect CYWM6935 WirelessUSB to AVR

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey there,
just got some samples of Cypress Wireless-USB modules CYWM6935 (after nearly half a year). I want to use these together with an ATmega8 or ATmega88 for battery monitoring and other remote sensor application as well as home automation purposes. Has anyone done that before and would share information:
- how much Flash and RAM will be needed for a basic functionality?
- which range and data rate is realistic?
- any known bugs or 'features'?

Any information would be very much appreciated.

Jörg.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

~1.5Kbytes of code space, ~70 bytes ram space for very basic radio driver layer

~10m indoors, ~30m outdoors LoS, 62.5kbps, best to keep payloads 16 bytes or less

I applied a slightly more robust "valids" filter on the receiver, and the radio works great :)

BYTE RadioReceive(BYTE *rxbuf)
{
   BYTE len;
   BYTE i;

   radio_status[2] = SpiRead((SPI_FRZ | 0x08));       //REG_RX_INT_STAT - clear receive status
   SpiWrite((SPI_FRZ | 0x07), 0x03);                  //REG_RX_INT_EN - enable EOFA and FULLA flags on IRQ pin
   SpiWrite((SPI_FRZ | 0x03), 0x90);                  //REG_CONTROL - enable rx
   DelayMicroSec(SYNTH_SETTLE);                       // wait for synth to settle
   DelayMicroSec(RECEIVER_READY);                     // wait for receiver afe ready
   i = 0;
   while(1)
   {
      while(!IRQ);                                    // wait 'til either EOFA or FULLA receive flag fires
      radio_status[2] = SpiRead((SPI_FRZ | 0x08));    //REG_RX_INT_STAT - check receive status
      if(radio_status[2]&0x01)
      {                                               //store REG_RX_DATA_A and REG_RX_VALID_A in user's rxbuf
         SpiFileRead((SPI_INC | 0x09), 2, &rxbuf[i]);
         if(rxbuf[i+1] > 3) 
         {
            i += 2;
            rxbuf[i] = SpiRead((SPI_FRZ | 0x22));     // store REG_RSSI in user's rxbuf
            i++;                                      // ~75usec of "idle" time between bytes when using 64kbps 
         }
      }
      if(radio_status[2]&0x02 && i) break;
   }
   SpiWrite((SPI_FRZ | 0x03), 0x00);                  //REG_CONTROL - return to idle
   len = i;

   return(len);
}