SPI interface


Closed Thread
Results 1 to 11 of 11

Thread: SPI interface

Hybrid View

  1. #1
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Dave,

    two modules... the first was serial ethernet



    and then yesterday an MM/SD card reader.



    The latter (when using the downloadable Hex file) should display a message that there is no card inserted when hooked up to via serial to a PC running a serial communicator (such as that contained inside microcode studio. However on power up and with it connected at the correct baud rate, I get several lines of hyroglythics, which on sebsequent re-booting the EP5 board is repeated exactly. However if I change crystals and do the same the characters displayed are different, but again are the same on subsequent re-boots of the EP5. The only difference is that the schematic shows an 8Mhz xtal and I don't have one (well not until I get home as my order has just arrived!) - hence the question about it being sensitive as to what clock frequency these thing run at.

    On the serial ethernet - nothing worked so I suspect the card is faulty !

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


    Did you find this post helpful? Yes | No

    Default

    Hi Malcolm,
    I take it you are loading your PIC with the compiled examplefiles provided by mikroE with the boards, correct? If so I'd say I say it's quite important that you have the correct x-tal speed otherwise all the timing calculations etc will be off. This MIGHT not matter for the actual SPI communications (at least not if running slower) but it WILL for sure when it comes to communicating with the PC over the PICs USART.

    Now, I looked at the example files for the microSD card and it looks like it's s written for 8Mhz oscillator and 19200 baud. The comments say 8Mhz HS-PLL so I'm not sure if it's actually 8Mhz or if it's 32Mhz.

    If you have a 4Mhz x-tal you MIGHT be able to run it if you set the baudrate in the terminal software to 9600. By the sound of you've already tried that but in case you haven't.... Then of coarse you must set all the DIP switches correctly but I'm sure you have that covered.

    I have a PICPLC16 board which have the serial ethernet "module" on board. I'm very interested in what you might come up with, codewise, when it comes to that. It should be doable in PBP but I don't think it's an easy task.

    Keep us posted!
    /Henrik.

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