2.4 ghz WiFi ID


Closed Thread
Results 1 to 31 of 31

Thread: 2.4 ghz WiFi ID

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425

    Default Re: 2.4 ghz WiFi ID

    Henrik,

    Thanks for the information. I'm not up to the task of writing any coding for TCP/IP since I know almost nothing about it. Regarding the MRF24WB0MB, what I meant was that Microchip provides it so it's "there." However, if it requires me to modify it with C, that option is out for me.

    Regarding the RN-171, the reason why I asked about SPI is due to the fact that the sheets 4, 5 and 6 in the datasheet all state NOT to connect the SPI interface, which is on pins 15, 16, 17 and 18. Also, I thought that SPI is quicker than using the UART, no?

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612

    Default Re: 2.4 ghz WiFi ID

    You're right, that IS confusing.
    It says right there that it supports SPI slave but then in the table over the pins it says Unused/Do not connect on the SPI pins. I Googled real quick and it seems like we're not the only ones that are confused..... If you find an answer please let us know!

    SPI can be (and generally is) conciderably faster then asynchronous (UART) but it depends on what the master AND slave devices are capable of. For example, if you set the USART up for 250kbit that will be conciderably faster then using bit-banged SPI (SHIFTOUT/SHIFTIN) but slower than using the MSSP module to do "hardware SPI" - which of course is the recommended way.

    Using the MRF24WB0MB + MCW1001A combo doesn't allow SPI between the PIC and network module either - it's asynchronous (UART) only I'm afraid.

    /Henrik.

  3. #3
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425

    Default Re: 2.4 ghz WiFi ID

    Ok, so here's a question I can't seem to find an answer to. I'm currently using RF modules that use the USART on my 18F4550 (Pins 1 and 44). Is the USART similar to the SPI where you can attach a number of devices and have the data lines go to high impedance mode when the CS line is driven high?

    My ultimate problem is that the RF devices use the USART, the MCP2515 uses the SDO pin and the RN-171 uses the USART (although I assume based upon what you are saying I may be able to use some other pins but the speed would be slower).

    In re-reading the datasheet, do you think this line:
    • Host data rates up to 921 Kbps TX, 500 Kbps RX for the UART, up to 2 Mbps over the SPI slave
    means that using the UART is faster than software SPI?

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612

    Default Re: 2.4 ghz WiFi ID

    No, not in the way that SPI works. However with a bit of hardware you can do it. For example you can use a CD4066 to switch between devices. Another option is to use a PIC with two usarts. It all depends....

    Perhaps you can use the USART for the RN-171, use SHIFTIN/SHIFTOUT (or the MSSP module) for the MCP2515 and use SERIN/SEROUT for the RF-module. It all depends....

    The speed of the bit-banged SPI (ie SHIFTOUT/SHIFTON) commands depends on the osciallator. The manual says 50kHz dependant on oscillator (I suspect 4MHz) and that the active state is held to a minimum of 2us. I interpret that as no matter how fast the PIC runs the active state will always be 2us, assuming that the clock is symetric that means 4us per bit or max 250kHz. I think that in reallity it'll be quite a bit less than that. So, if you're comparing the USART to bit-banged SPI I'd say it's likely that the using the USART will be faster and because receving and transmitting is handled by hardware the PIC can do other things - if used properly.

    SHIFTIN/SHIFTOUT can be used on any pins of the PIC - not just the SDI/SDO pins.
    Using the MSSP module to do "hardware SPI" requires the use of the SDI/SDO pins since that is the pins to which the MSSP module is connected. SHIFTIN/SHIFTOUT does not use the MSSP module.
    SERIN/SEROUT can be used on any pins of the PIC - not just the TX/RX pins.
    Using the USART to do "hardware asynchronous" communications requires the use of the TX/RX pins since that is the pins to which the USART module is connected. SERIN/SEROUT does not use the USART. HSERIN/HSEROUT does.

  5. #5
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425

    Default Re: 2.4 ghz WiFi ID

    I've given this some thought. I think I'm going to get rid of the RF devices and just use the MCP2515 on the SPI (I want to keep this because I can add other SPI devices with ease) so that leaves where to put the RN-171. Isn't the MSSP on the same pins as the SPI? If so, what about using the SC16IS750 for the RN-171? I've never used it but it looks like it should work. What do you think?

  6. #6
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612

    Default Re: 2.4 ghz WiFi ID

    Hi,
    I think we're just talking above each other heads here.
    Yes the MSSP module IS the module doing SPI so of course the MSSP-module uses the SPI pins on the PIC. But, again, if you're using SHIFTIN/SHIFTOUT to do your SPI communications then your are NOT using the MSSP module - even if you happen to have the MCP2515 connected to those pins.

    If you're ditching the RF-module that frees up the USART to be used with RN-171 does it not?

    The exeternal one you linked to has one advantage though and that's its internal 64 byte buffer giving you some flexibillity.

    If you're still in a position where you can add external circuitry why not simply change the PIC to one with two USARTS (the 18F45J50 for example (there are plenty)) instead of messing with external ones? Or, again, use SERIN/SEROUT for one of the modules and the USART for the other.

    /Henrik.

  7. #7
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425

    Default Re: 2.4 ghz WiFi ID

    Regarding the SPI, I'm using the SSPBUF to send and receive data. That's not shiftin/shiftout, is it?

    I've thought about using another PIC but then I'd have to redesign. In addition, the 18F45J50 doesn't have dedicated ICSP pins. I'm not opposed to it but I've put a lot of work into this product. However, if I'm going to redesign, I might as well go for it all and use a PIC24, PIC32 or DSPIC33 because they have CAN, USB, SPI and USART. Does PBP even support them?

    I feel like I've painted myself into a corner.
    Last edited by Christopher4187; - 12th January 2013 at 16:30.

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