Using I2C with FullSpeed USB


Closed Thread
Results 1 to 16 of 16

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    how many byte do you read at the time?

    still working with a single byte at the time? if so, just do loop and insert a USBSERVICE inside

    As now i didn't use I2CREAD/WRITE with USB ones so...The MSSP is also suggest by me.

    Charles.. i'm with you
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default

    Steve, the MCP23016 has 16 bytes and I'm using at least 13 of them.

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    miip 16 bits, 2 bytes. i don't remind how to access to them.. since too much time i don't use them can you refresh my single workable brain cell on this friday before i left home to night club
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default

    D'uh, yeah, bits.

    I just use I2CREAD for a WORD and get all 16 bits in one shot.

    I checked the MicroChip site and they have the MCP23S17 which goes at a maximum of 10MHz in SPI mode. I don't think that's worth the effort to even try.

    But I did get another idea; using a 16F628 to read the MCP23016, sets 4 output pins to a binary value (I just need the number of the 1st active pin) and then sets a READY pin. The 18F4550 works on USB until the READY pin is set and then reads the 4 input pins. TADAA!!! Super fast 16 bit parallel exchange between 2 mcus.

    I just don't know how the 18F4550 can reset the READY pin though. I never got a full grasp of that concept.

    Robert


    EDIT: Reviewing my own thread from a while ago:
    http://www.picbasic.co.uk/forum/show...ight=busy+line
    Last edited by Demon; - 8th July 2006 at 01:22.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    mmm, that make me think of few things to try on sunday... i'l do some test with the 4550 and I2C... Anyways i guess that one project i have in head will probably need at least one I2C external device... so i'll hae to mess with I2CREAD/WRITE and/or MSSP anyway.

    Your point is valid but need extra hardware... sure workable, but it have to be done without it. The MSSP is the one i mostely suspect workable. SPI is faster than I2C... but MSSP i2C is more fast than PBP I2CREAD/WRITE

    mmm...
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default

    Steve, I don't have much choice. The SPP feature on the 18F4550 has only 8 bits, I need at least 13.

    I wonder if I can do this with discrete components instead of using the MCP23016 and 16F628 to generate a 4 bit combination. I have 13 momentary push-buttons that I have to get to the 18F4550 as fast as possible.

    I'm sure there's another way. I'll ask on an electronics forum and see what the gurus there come up with.

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  7. #7
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Sure it have 8 bits... 2 successive read .. well something like stated somewhere in the MCP datasheet. It must exist a quick drwaing of it somewhere in.

    if you really want to add stuff, 4 choice spring to mind

    use a bigger PIC than the 16F28, then just read the i/o, send it to the 4550 via USART.

    Use a keypad decoder like 74c922

    Use a single (or more) A/D pin of the 4550 with a multi-step voltage divider... yisssh

    Find a multiplexer... time is short now, but it have to exist, i had the 4067 idea... but i'm not sure... i must forget something on this chip.. what? i don't know.
    Last edited by mister_e; - 8th July 2006 at 02:18.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. I2C Master/Slave 16F88/16F767 working code
    By DanPBP in forum Code Examples
    Replies: 2
    Last Post: - 23rd October 2012, 22:31
  2. Simple USB Comms Problem
    By awmt102 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 6th January 2010, 20:17
  3. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 21:07
  4. I2C Master Slave issues.
    By cpayne in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th March 2008, 19:33
  5. Please help with i2cslave i2c slave
    By cycle_girl in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 1st December 2005, 13:55

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