corebasic manual question and I2C

41 views
Skip to first unread message

viscomjim

unread,
Jan 2, 2014, 2:49:30 PM1/2/14
to solde...@googlegroups.com
Hi There,

I am getting my soldercore tomorrow from mouser and have been going through the corebasic manual in preparation of having some fun. I see in a lot of instructions something like this...

Software I2C Bus Driver

Installation

INSTALL "SOFTWARE-I2C-BUS" USING scl, sda 
INSTALL "SOFTWARE-I2C" USING scl, sda 
INSTALL "SOFT-I2C" USING scl, sda

Options

None.


When you show the 3 different INSTALL "..." lines, does this mean we can use any one of these formats or are all three required to install that particular driver. This goes for other commands in the manual that show multiple statements. I apologize if this is a noob question.


Also, I am working on a project that requires a few more serial ports to control some serial to stepper boards. I see that there are I2C to uart boards (not shields) available. Do you see any bumps in the road ahead by using these types of products. A simple example would be... https://www.sparkfun.com/products/9981 If not bumps, do you have any examples of this type of setup in corebasic where I can just send and receive serial data with the same ease as using your internal uarts with their drivers installed?


I appreciate the answers to my past questions and hope not to bug you guys too much. I am really looking forward to using this beast and am very pleased that you actually respond to the forum questions.


Jim



CoreBASIC Wizard

unread,
Jan 4, 2014, 5:10:18 AM1/4/14
to solde...@googlegroups.com
Hi,


On Thursday, 2 January 2014 19:49:30 UTC, viscomjim wrote:
Hi There,

I am getting my soldercore tomorrow from mouser and have been going through the corebasic manual in preparation of having some fun. I see in a lot of instructions something like this...

Software I2C Bus Driver

Installation

INSTALL "SOFTWARE-I2C-BUS" USING scl, sda 
INSTALL "SOFTWARE-I2C" USING scl, sda 
INSTALL "SOFT-I2C" USING scl, sda

Options

None.


When you show the 3 different INSTALL "..." lines, does this mean we can use any one of these formats or are all three required to install that particular driver. This goes for other commands in the manual that show multiple statements. I apologize if this is a noob question.



That is correct; the driver is known by a specific name, SOFTWARE-I2C-BUS, and also common names, e.g. SOFT-I2C.
 

Also, I am working on a project that requires a few more serial ports to control some serial to stepper boards. I see that there are I2C to uart boards (not shields) available. Do you see any bumps in the road ahead by using these types of products.


Running them fast enough is usually the issue.  I have implemented some drivers for SPI-based UARTs, but I have not integrated these into CoreBASIC at present.
 

A simple example would be... https://www.sparkfun.com/products/9981 If not bumps, do you have any examples of this type of setup in corebasic where I can just send and receive serial data with the same ease as using your internal uarts with their drivers installed?



I'm really not sure about how quickly you'd be able to run things.  With 100 or 400 kHz I2C clock, I guess you might be able to run these at 19,200 or something if you're using CoreBASIC, but this is only a guess.
 

I appreciate the answers to my past questions and hope not to bug you guys too much. I am really looking forward to using this beast and am very pleased that you actually respond to the forum questions.



You're welcome.

-- Paul.

viscomjim

unread,
Jan 4, 2014, 9:32:17 AM1/4/14
to solde...@googlegroups.com
Thank you for your reply.

Do you recommend that the extra uart(s) should be connected via SPI instead of I2C? I noticed somewhere in the manual or on your site where you interfaced a sensor (I think it was pressure) using the SPI interface. Would that interface pose a low limitation on the speed of the uart as the I2C would?

Have a great day!

CoreBASIC Wizard

unread,
Jan 4, 2014, 4:02:25 PM1/4/14
to solde...@googlegroups.com
Hi,


On Saturday, 4 January 2014 14:32:17 UTC, viscomjim wrote:
Thank you for your reply.

Do you recommend that the extra uart(s) should be connected via SPI instead of I2C? I noticed somewhere in the manual or on your site where you interfaced a sensor (I think it was pressure) using the SPI interface. Would that interface pose a low limitation on the speed of the uart as the I2C would?

Either interface would be fine; make sure you get a device with an internal buffer that's fairly large -- anything of 256+ bytes would make it easier to interface because the device will buffer this for you. For small buffers, you need to empty them more frequently and delays will potentially cause buffer overflow.

-- Paul.
Reply all
Reply to author
Forward
0 new messages