On Fri, 13 Feb 1998 13:19:26 +0000, Keith Howell wrote: > Regarding I2C, arbitration is done on a bit by bit basis so > the CPU needs to supervise each bit's progress. So you don't gain > much by having a byte-to-bit hardware interface because you'd only > have to write software to manage that. According to the 17C75X data sheet: > A typical transmit sequence would go as follows: > 1. The user generates a Start Condition by setting the START enable bit (SEN) in SSPCON2. > 2. SSPIF is set. The module will wait the required start time before any other operation takes place. > 3. The user loads the SSPBUF with address to transmit. > 4. Address is shifted out the SDA pin until all 8 bits are transmitted. > 5. The SSP Module shifts in the ACK bit from the slave device, and writes its value into the SSPCON2 register ( SSPCON2<6>). > 6. The module generates an interrupt at the end of the ninth clock cycle by setting SSPIF. > 7. The user loads the SSPBUF with eight bits of data. > 8. DATA is shifted out the SDA pin until all 8 bits are transmitted. So I assume this is all doing something for you. It appears like the hardware is taking care of all the bit-level management, and you only have to give it bytes when it tells you to. Of course, I may be completely out to lunch here :-) It looks like the HW also does full multi-master arbitration for you. > An asynchronous UART is worth its silicon because it handles > time-critical stuff like baud rate generation, and the data > is sent out over relatively long time periods. Well, the 17C756 has two of them, with independent baud rate generators. Unfortunately, right now it looks like I won't be using them. I may end up changing how I do things, though... > Changing subject, tell us about your cool app? Well, I'm basically building a very small autonomous underwater submarine. I'm using the big PIC (17C756) as the main CPU, and it will talk to a bunch of other small PICs over an I2C bus. Each of the other PICs will have the responsibility of talking to one hardware device, and providing data to the master when requested on the I2C bus. > Is it going to be braving the North Sea (been there done that) > or just retrieving your soap from the bottom of your bath? :-) I doubt this one will be braving the North Sea, but I will be testing it in swimming pools at first, and then hopefully (if it works) lakes. The next one will be larger, and it *will* be braving the North Sea :-) Later, Jon -------------------------------------------------------------- Jon Hylands Jon@huv.com http://www.huv.com/jon Project: Micro Seeker (Micro Autonomous Underwater Vehicle) http://www.huv.com