element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Embedded Forum Microchip SPI query
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Embedded and Microcontrollers to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 5 replies
  • Answers 2 answers
  • Subscribers 461 subscribers
  • Views 419 views
  • Users 0 members are here
Related

Microchip SPI query

samplerman
samplerman over 14 years ago

This is only a minor issue ref the Microchip implementation of Master mode SPI in the MSSP module. But I would appreciate any assistance here.

 

On a typical connection from a PIC18F45K20-I/MLPIC18F45K20-I/ML to a 25LC320 EEPROM, a read command can be sent followed by two address bytes,

the module then provides 8 'clocks' to read out the data. According to the EEPROM data sheet, all the data from the initial start address may

then be sequentially read out of the EEPROM without resending a read command ( followed by two address bytes etc)

question - how can the PIC MSSP module be used to sequentially read the all the data out of the EEPROM without resending read commands

in between each byte received?

Is there a command to continue sending clock cycles within the module?

Thanks

Carl

  • Sign in to reply
  • Cancel
  • firatkocak
    0 firatkocak over 14 years ago

    Hi,

     

    AFAIK, when you send a read command then EEPROM is in the read mode till it receives a LOW CS signal. After reading a byte internal read address counter is incremented by one and then next and then it goes on. For this reason you can read the entire EEPROM data in one process. This is also true for I2C EEPROM devices where you need to send  aSTOP command to interrupt reading process.

     

    I hope it helps.

     

    Firat

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • samplerman
    0 samplerman over 14 years ago in reply to firatkocak

    Hi Firat

    Thanks for your reply. Yes Isaw that the EEPROMS had this nice feature to continue auto-incrementing the address.

    My problem is with the PIC18F46K20-E/PPIC18F46K20-E/P PSI module, it doesn't seem to be able to use this nice feature. the only way I can get

    the PIC to continue send clock cycles out for continuouse reading would to be to use Bit-banging of the clock line which is a bit crude.

    thanks

     

    Carl

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • KennyMillar
    0 KennyMillar over 14 years ago in reply to samplerman

    Hopefully this App Note An1000 and this video will help.

    Both are from Microchip :-)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • firatkocak
    0 firatkocak over 14 years ago in reply to samplerman

    Hi Carl,

     

    I have never used PIC18F46K20-E/PPIC18F46K20-E/P yet but i have used Pic18F8722, Pic18F4620, Pic18F452 and some others. I have used SPPI module with Flash ICs like Mx25 from Macronix and 25Df321 from Atmel with no problem. So it is difficult to say something more clear to locate where the problem is. Maybe the source code you are using may help a bit more.

     

    Firat

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • samplerman
    0 samplerman over 14 years ago in reply to KennyMillar

    HI

    Did look at the app. note AN1000 from Microchip earlier but it still did not answer it.

    I have had success though by using a briefly mentioned note in the PIC18F46K20-E/PPIC18F46K20-E/P data sheet, it says

    that one of the options is "Master sends dummy data - slave sends data", although an example of how to do this

    was not shown. After the first READ command and its address bytes etc are sent, I just ask the PIC to transmit 00H

    to the EEPROM instead of a valid read or write command. This seems to tell the MSSP module to send out 8 clock cycles

    whilst reading in the data from the EEPROM. As long as I do not deselect the EEPROM then the sequential

    data reads are possible.

     

    thanks to all for your help

     

    regards

     

    Carl

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube