Ok. It's time to ask about talking/listening to a Raspberry Pi


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Jul 2009
    Posts
    33

    Default Ok. It's time to ask about talking/listening to a Raspberry Pi

    Mucking about with my Raspberry Pi yesterday I managed to get it chatting to my pc via serial using a max3232cpe. That was easy. I would like to get it to talk to a Pic now and being a bit ignorant I thought I would ask some questions.
    To start with I am going to use a pic18f24k22 because it has some lovely hpwm so I can muck about with my rgb led strip.
    I have done some serial interfacing with pics using serout. I guess this would work but it seems there must be a simpler way rather than going via a max3232cpe. And in order to use hserout I think I need yet more circuitry to interface properly which I am still trying to learn about. (but we could start there I suppose).

    How about IC2 / SPI? I haven't done this before but would this be a good solution?

    Any help would be appreciated. Surely we could have some fun?

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


    Did you find this post helpful? Yes | No

    Default Re: Ok. It's time to ask about talking/listening to a Raspberry Pi

    Hi,
    Since you apparently needed a levelshifter/inverter to get the Pi talking to the PC it means that it must output a non inverted signal at logic level (3.3V?) - which is exactly what the USART in the PIC outputs and expects as input (on some PICs you can even invert in hardware if needed). So, it should just be a matter of connecting TX to RX, then you could use HSERIN to receive data from the Pi - for example.

    /Henrik.

  3. #3
    Join Date
    Jul 2009
    Posts
    33


    Did you find this post helpful? Yes | No

    Default Re: Ok. It's time to ask about talking/listening to a Raspberry Pi

    Yes it is 3.3v from the Pi.
    so just to be absolutely sure....because the Pi has no protection and is not 5v tolerant....I am unlikely to blow up my pi if I directly connect it to my pic18f24k22? (I won't be holding you responsible!) I thought that pics worked at 5v. I just want to make sure is all :-)

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Ok. It's time to ask about talking/listening to a Raspberry Pi

    Do not take this wrong, but it seems you need to learn a little more about your hardware before you go advanced.

    Take a look at the PIC's data sheet under electrical and you will find the voltage vs speed.
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Jul 2009
    Posts
    33


    Did you find this post helpful? Yes | No

    Default Re: Ok. It's time to ask about talking/listening to a Raspberry Pi

    Hmmmn.
    I can take a look at the data sheet but not really understand it. What exactly am I looking at? I have always found I can understand about 0.2% of the data sheet.

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Ok. It's time to ask about talking/listening to a Raspberry Pi

    The 18F24K22 has an operating voltage of 1.8 to 3.6 volts as is. When you open the data sheet this information is on page #1 (pdf page #3)
    Then look at section 26.

    So run the 18F24K22 at the rated voltage and you should be fine.
    Dave
    Always wear safety glasses while programming.

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