It is currently 26 May 2018 03:19

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: I2C library for Pic16F
PostPosted: 25 Jan 2018 20:05 
Offline

Joined: 25 Jan 2018 16:23
Posts: 3
Hi There,

I am using PIC16F913. This microcontroller has SPI and I2C. I have EasyPIC6 development board and MIkroB. I used SPI library without issues.
Now I am trying to use I2C library however I am unable to find I2C library in library manager.

Can someone please point me in the right direction where I can get this library? Or what do I need to do to enable this library in library manager?

Thanks in advance


Top
 Profile  
 
PostPosted: 26 Jan 2018 11:07 
Offline
mikroElektronika team
User avatar

Joined: 18 Dec 2017 18:19
Posts: 200
Hi,

The main reason for that is because PIC16F913 doesn't have MSSP(master synchronous serial port) but instead has SSP(synchornous serial port).

An MSSP adds logic to act as a Master I2C device. An SSP can only act as a slave, you have to "bit-bang" to act as a master.

Additionally, the SSP-module doesn't support the General-Call-Address (slave-mode), which the MSSP-module supports.

That's the reason why there is no library.

As I mentioned before, you would have to "bit-bang".

Bit banging is a technique for serial communications using software instead of dedicated hardware.

Software directly sets and samples the state of pins on the microcontroller, and is responsible for all parameters of the signal: timing, levels, synchronization, etc.

In contrast to bit banging, dedicated hardware (such as a modem, UART, or shift register) handles these parameters and provides a (buffered) data interface in other systems, so software is not required to perform signal demodulation.

Bit banging can be implemented at very low cost, and is used in, for example, embedded systems.

Kind regards,

_________________
Strahinja Jacimovic


Top
 Profile  
 
PostPosted: 26 Jan 2018 19:37 
Offline

Joined: 25 Jan 2018 16:23
Posts: 3
Thank you Strahinja.


Top
 Profile  
 
PostPosted: 30 Jan 2018 02:20 
Offline

Joined: 25 Jan 2018 16:23
Posts: 3
Hi Strahinja,

DO you have an example of I2c bit banging?

Thanks


Top
 Profile  
 
PostPosted: 30 Jan 2018 16:44 
Offline
mikroElektronika team
User avatar

Joined: 18 Dec 2017 18:19
Posts: 200
Hi,

I believe you have something regarding this matter here:
https://forum.mikroe.com/viewtopic.php?f=13&t=67971&view=previous

Kind regards,

_________________
Strahinja Jacimovic


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: