How you directly access serially chained devices, like LEDS, shift registers, etc?


Closed Thread
Results 1 to 20 of 20

Hybrid View

  1. #1
    Join Date
    Aug 2011
    Posts
    453


    Did you find this post helpful? Yes | No

    Default Re: How you directly access serially chained devices, like LEDS, shift registers, etc

    If you just need more RAM for a display buffer there are much faster devices than an external EEPROM, like the 23LC512 serial SPI SRAM.
    Also, since SHIFTOUT runs at approx 50KHz, you could even write your own dedicated version that would be MUCH faster than that, although using the MSSP/SPI peripheral is pretty straight forward and would easily get you into the multi-MHz range.

  2. #2
    Join Date
    Feb 2013
    Posts
    1,124


    Did you find this post helpful? Yes | No

    Default Re: How you directly access serially chained devices, like LEDS, shift registers, etc

    Where I can learn about that MSSP in PBP ?

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default Re: How you directly access serially chained devices, like LEDS, shift registers, etc

    On the Data Sheet of each PIC you will use. You learn the ins and outs of the sub section of the PIC and the registers that you have to manipulate directly.

    PBP had nothing to do with the MSSP/SPI section other than setting bits in the registers.

    Ioannis

  4. #4
    Join Date
    Feb 2013
    Posts
    1,124


    Did you find this post helpful? Yes | No

    Default Re: How you directly access serially chained devices, like LEDS, shift registers, etc

    Well someone above, called Henrik , said that PBP is supporting it directly, this is why I asked

  5. #5
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: How you directly access serially chained devices, like LEDS, shift registers, etc

    If you go to Microchip.com and type MSSP or SPI or I2C into the Search window, then click on Application Notes in the left column, there are numerous Application Notes on how these peripherals function, and how to put them to use. Code is usually in ASM and/or C, but the concepts are outlined extremely well.

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


    Did you find this post helpful? Yes | No

    Default Re: How you directly access serially chained devices, like LEDS, shift registers, etc

    I did not say PBP have high level commands to drive your specific device using the MSSP module - no - I said you don't need any assembly language to use the MSSP module.

    You configure the module by writing values to a couple of registers. (Should it run in SPI or I2C mode, what clock frequency, MSB/LSB first and so on). It's the same procedure as configuring an I/O for the correct mode by setting TRIS and ANSEL or to select what clock source to use for the ADC by writing to ADCONx (or whatever). But if you're not prepared to read a couple of pages in the datasheet then forget it and stick with SHIFTOUT.

    Sometimes users seems to think that TRIS, CMCON, ANSEL, ADCON and what not are commands - they are not. They are registers in the PIC to which can write by simply assigning a value to them, TRISA=127 or read myVar = CMCON. That's as basic as it gets and doing that to a few registers are all it takes to configure the MSSP module. Sending a byte is then as simple as writing said byte to another registers and out it goes. Again, just take 1h and READ the datasheet.

Similar Threads

  1. LCD's with Shift Registers, and LCDOUT
    By Darrel Taylor in forum PBP Extensions
    Replies: 11
    Last Post: - 3rd April 2015, 14:34
  2. Smart Star (how to use shift registers)
    By mackrackit in forum Code Examples
    Replies: 3
    Last Post: - 30th November 2008, 20:06
  3. Use the PIC 16f877 or 877A instead of shift registers.
    By tsanders in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th October 2006, 17:23
  4. Shift Registers
    By shahidali55 in forum General
    Replies: 2
    Last Post: - 7th September 2006, 20:07
  5. Shift Registers For LCD Display
    By jetpr in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 7th July 2006, 15:03

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