LaunchPad I2C Communication

1,192 views
Skip to first unread message

xBloodyxSkull

unread,
Nov 14, 2010, 1:24:30 PM11/14/10
to TI Launchpad
Does anybody know how to communicate between LaunchPads via I2C? I
would like to have a master unit connected to as many slave units as
possible. The master will most likely be a computer, but I would like
to simulate it first using a LaunchPad or Arduino. The slave units
must be LaunchPads.

Which pins do I use for the I2C communication? Any code examples? Do I
need pull-up resistors?

Any help will be much appreciated!

Gerard Sequeira

unread,
Nov 14, 2010, 1:28:56 PM11/14/10
to ti-lau...@googlegroups.com
Cde, who is a member of the 43oh forums connected a port expander to the Launchpad via I2C
His project is here.
--
Homepage: http://www.machinegrid.com :: Robots at Work!!

T_Shirt

unread,
Nov 14, 2010, 11:14:19 PM11/14/10
to TI Launchpad
Kinda long, like a book, so I made up 'chapter' titles too.

Pins:
1.6 and 1.7. All 1.6s go together and all 1.7s go together. You have
to remove the LED2 shunt.

Resistors:
Mine worked without resistors on the breadboard but the I2C spec calls
for them.

The End Objective:
I wanted to take several MSP430G2231's on an I2C bus and use them to
read seldom changing analog values and report across I2C when asked to
greatly/easily expand the ADC capacity of some master chip. I like
the idea of when I needed more ADC I could just drop in another 231 on
the bus.

The Plan:
First I wanted to get a 2x16 character display on a chip so I could
watch the data change in almost real time without messing with the
IDE. Once I had that it was natural for it to become the master that
asked for values from others. I wanted to write the code from about
scratch to maximize my learning so I dove head long in to the
documentation.

Pitfall One: Non-applicable documentation
At (http://processors.wiki.ti.com/index.php/MSP430_LaunchPad_%28MSP-
EXP430G2%29) i found a link to SLAU144E for the MSP430x2xxx
Family(http://www.ti.com/lit/pdf/slau144), chapters 14-17 are about
the USI module. Chapters 15-17 DO NOT apply to the launchpad line of
chips. They have all sorts of info but it took me forever to figure
out the uselessness there of. (Section 17.3 has some very useful
diagrams of I2C flow that should be reviewed by any serious I2C coder
and helped me a ton in figuring out I2C) chapter 17 on I2C otherwise
messed me up because all the chip specific info does not apply.
Chapter 14 on generic USI is good.

Moral one:
The Value line has a USI without the cool extended I2C or SPI
functionallity. Curse chapters 15-17. You have more interrupt calls
and have to micro manage more with the value line as learned in Plan
B.

Plan B:
I started getting somewhere working with the example code i think from
http://www.ti.com/lit/zip/slac080. They didn't have exactly what I
needed and the best example in the index didn't have a code file so i
had to start from a lowly single byte transmission example. I built
up from there to variable multi-byte read/write code.

Pitfall Two: Bad info in example code
Some example code comments said to connect SDA to SCL. But since I
don't work for TI, I thought they should know better than I, I trusted
the comments and got a bucket of fail until I did what I thought was
right to begin with.

Eventually:
I think I got to a slave that would transmit a variable amount of data
each transaction based on what data had changed (it only sent data
that changed) and would receive one byte to be later used to change
mode(send new vs. send all). The data was auto incremented for
simulation. The master would read the slave and get the first byte
which was the number of data bytes to follow (0 for no new data and to
trigger stop condition) and receive those and display the values on
screen or write a single byte to the slave.

Code to follow in another post, have to find it and hope it was my
good code.

T_Shirt

unread,
Nov 14, 2010, 11:54:57 PM11/14/10
to TI Launchpad
Slave code of mine
Compiles but not re-verified on hardware. with master code
(I dug this out of an old Virtual Machine, the modern equivalent of
the trunk in the attic.)


//
******************************************************************************
// I2C Slave Transmitter
// multi byte read reloop
// single byte write
//
// 6 OCT 2010
// Author:tsc...@gmail.com
// free to use for non-commercial use with attribution.
// Some parts from or inspired by TI example code by
// Z. Albus, R. B. Elliott and H. Grewal.
//
******************************************************************************
#include <msp430g2231.h>

char dataIn = 2; //byte from the master
char lenToSend=2;
char dataOut[4]={0,50,100,150}; //New data to transmit container
char dataIndex=0; //array index for dataOut, also amount of data
sent
char SLV_Addr = 0x50; // Address is 0x48<<1 for R/W
char RWbit=0; // 1=read, 0=write
int I2C_State = 0; // State variable

void main(void){
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog
if (CALBC1_1MHZ ==0xFF || CALDCO_1MHZ == 0xFF){while(1);}
// If calibration constants erased, trap CPU
BCSCTL1 = CALBC1_1MHZ; // Set DCO
DCOCTL = CALDCO_1MHZ;

P1OUT = 0xC0; // P1.6 & P1.7 Pullups
P1REN |= 0xC0; // P1.6 & P1.7 Pullups
P1DIR = 0xFF; // Unused pins as outputs
P2OUT = 0;
P2DIR = 0xFF;

USICTL0 = USIPE6+USIPE7+USISWRST; // Port & USI mode setup
USICTL1 = USII2C+USIIE+USISTTIE; // Enable I2C mode & USI
interrupts
USICKCTL = USICKPL; // Setup clock polarity
USICNT |= USIIFGCC; // Disable automatic clear
control
USICTL0 &= ~USISWRST; // Enable USI
USICTL1 &= ~USIIFG; // Clear pending flag
_EINT();

while(1){
LPM0; // CPU off, await USI interrupt
_NOP(); // Used for IAR
}
}

/******************************************************
// USI interrupt service routine
//
// States Function
// ----------------- -------------
// 2 - 4 - 26 Wrong Address
// \
// 8 - 24 - 26 Write
// \
// 10 - 14 Read
// |
// 12(multi-reloop)
//*****************************************************/
#pragma vector = USI_VECTOR
__interrupt void USI_TXRX (void){
if (USICTL1 & USISTTIFG){ // Start entry?
I2C_State = 2; // Enter 1st state on start
}
switch(I2C_State){
case 0: //Idle, should not get here
break;

case 2:
//Got a Start Condition
//Prep to recieve Address + R/W bit
P1OUT |= 0x01; // LED on: Sequence start
USICNT = (USICNT & 0xE0) + 0x08;// Bit counter = 8, RX Address
USICTL1 &= ~USISTTIFG; // Clear start flag
I2C_State = 4; // Go to next state: check address
break;

case 4: // Process Address and send (N)Ack
//USISRL= Address + R/W
//Prep bit to send
//address match->prep Ack
//address miss ->prep Nack
USICTL0 |= USIOE; // SDA = output
if ((USISRL & 0xFE) == SLV_Addr){
// Address Match
if (USISRL & 0x01){
//if address match then save/set RWbit
RWbit = 1;
}
else{
RWbit = 0;
}
USISRL = 0x00; //Load Ack to send
I2C_State = 8;
}
else{
// Address Miss
USISRL = 0xFF; //Load NAck to Send
I2C_State = 26; //next state: prep for next Start
}
USICNT |= 0x01; //Bit counter = 1, send (N)Ack bit
break;

case 8: // Send Data byte
// branch on RWbit
// R/W=1:read :Prep to transmit byte
// R/W=0:write:Prep to recieve byte
if (RWbit == 1){
//Read code
//prep to TX data
dataIndex=0; //reset counter
USICTL0 |= USIOE; //SDA = output
USISRL = dataOut[dataIndex];//Load data byte to be sent
I2C_State = 10;
}
else{
//Write code
//prep to RX data
USICTL0 &= ~USIOE; // SDA = input
I2C_State = 24; //
}
USICNT |= 0x08; //Bit counter = 8, TX data
break;

case 10:
//Second data byte was just sent
//prep to recieve ack or nack
//logic to continue transfers or shutdown
USICTL0 &= ~USIOE; // SDA = input
USICNT |= 0x01; // Bit counter = 1, receive (N)Ack
dataIndex++;
if(dataIndex >= lenToSend){
//Check if all data has been sent
I2C_State = 14; //no more data
}
else{
I2C_State = 12; // more data
}
break;

case 12:
//repeated send loop state, send back to 10 for reloop checking
//bit just recieved
//prep next byte to be sent
USICTL0 |= USIOE; // SDA = output
USISRL = dataOut[dataIndex]; //Load data byte to be sent
USICNT |= 0x08; // Bit counter = 8, TX data
I2C_State = 10;
break;

case 14:
//Ack or nack just recieved
//Reset machine after read command
//Prep for next Start Condition
dataOut[0]++; // Increment Slave data
dataOut[1]--;
USICTL0 &= ~USIOE; // SDA = input
I2C_State = 0; // Reset state machine
P1OUT &= ~0x01; // LED off
break;

case 24:
//Byte just recieved
//prep to send Ack
//goto closing state
dataIn = USISRL; // save the byte that was just recieved
lenToSend = dataIn;
USICTL0 |= USIOE; // SDA = output
USISRL = 0x00; // Send Ack
USICNT |= 0x01; // Bit counter = 1, send (N)Ack bit
I2C_State = 26;
break;

case 26:
//Reset Machine
//Prep to wait for Start Condition
USICTL0 &= ~USIOE; // SDA = input
I2C_State = 0; // Reset state machine
P1OUT &= ~0x01; // LED off
break;
}

USICTL1 &= ~USIIFG; // Clear pending flags
}

T_Shirt

unread,
Nov 15, 2010, 12:05:49 AM11/15/10
to TI Launchpad
Okay I can't for the life of me find my last master code. Here is the
latest I have. I doesn't support the variable length recieve that the
slave does. The stuff i can't find had the variable length recieve
working. YMMV. Compiles with CCS in win XP in Virtual Box on a
macbook runnng 10.5.8
Lots of useful stuff here and the display routines can be lifted for
other stuff too.


//
******************************************************************************
// I2C Master Receiver,
// double byte read
// single byte write
//
// 5 OCT 2010
// Author:tsc...@gmail.com
// free to use for non-commercial use with attribution.
// Some parts from or inspired by TI example code by
// Z. Albus, R. B. Elliott and H. Grewal.
//
******************************************************************************
#include <msp430g2231.h>

//My display routines
void formatAndSend(char data);
void dispClear(int arg);
void dispSend4(char data);
void dispSend8(char data);
void dispGo(int row, int col);
void wait(int max);

char rs=0; //(0,1) register select for displaychar SLV_data =
0x00;
char SLV_Addr = 0x50; // Address is 0x48 << 1 bit + 1 for Read
char toggle1; // just a var to switch between first and second byte
char RWbit = 1; // (0,1) 0= writeto slave, 1= read from slave
char counter1=0; //just a counter to insert write cycles for fun
int I2C_State = 0; // State variable



void main(void){
volatile unsigned int i; // Use volatile to prevent removal

//Clocks
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog
if (CALBC1_1MHZ ==0xFF || CALDCO_1MHZ == 0xFF){while(1);}
// If calibration constants are erased do not load, trap CPU!!
BCSCTL1 = CALBC1_1MHZ; // Set DCO
DCOCTL = CALDCO_1MHZ;

//Pin Setup
P1SEL &= 0x06; //clear 39, don't care 0xC0
P1REN = 0xC6; //set 0xC0, clear 0x39
P1DIR |= 0x39; //set 0x39
P2SEL = 0x00; //clear 0xC0
P2DIR = 0xFF; //set 0xC0
P2REN = 0x00; //clear 0xC0

//Display init
rs=0;
dispSend4(0x20);
dispSend8(0x28);
dispSend8(0x0e);
dispSend8(0x06);
rs=1;

//Display form
dispSend8('1');
dispSend8(':');
dispGo(2,1);
dispSend8('2');
dispSend8(':');
dispGo(1,1);

//USI init
USICTL0 = USIPE6+USIPE7+USIMST+USISWRST; // Port & USI mode setup
USICTL1 = USII2C+USIIE; // Enable I2C mode & USI interrupt
USICKCTL = USIDIV_3+USISSEL_2+USICKPL; // Setup USI clocks: SCL =
SMCLK/8 (~120kHz)
USICNT |= USIIFGCC; // Disable automatic clear control
USICTL0 &= ~USISWRST; // Enable USI
USICTL1 &= ~USIIFG; // Clear pending flag
_EINT();

while(1){
counter1++; //Counter1 is used to send a write to the Slave once
every 50 transactions
if(counter1 > 49){
counter1=0;
RWbit = 0;
SLV_Addr = 0x50;
}
else{
RWbit = 1;
SLV_Addr = 0x51;
}
dispGo(1,7);
formatAndSend(counter1);
dispSend8(' ');
formatAndSend(SLV_Addr); //Shows the slave address including RWbit

USICTL1 |= USIIFG; // Set flag and start communication
LPM0; // CPU off, await USI interrupt
_NOP(); // Used for IAR
for (i = 0; i < 5000; i++); // Dummy delay between communication
cycles
}
}

/******************************************************
// USI interrupt service routine
//
// States Function
// ----------------- -------------
// 0 - 2 - 4 setup always happens
// \
// 10 nack recieved, end
// or
// 18 - 20 - 10 Write byte to slave
// or
// 6 - 14 - 16 - 8 - 10 read bytes from slave
//*****************************************************/
#pragma vector = USI_VECTOR
__interrupt void USI_TXRX (void){
switch(I2C_State){

case 0:
//Generate start condition
//Prep address to send
//case 0 is manually tiggered by setting the interrupt flag
USISRL = 0x00; // Generate Start Condition
USICTL0 |= USIGE+USIOE;
USICTL0 &= ~USIGE;
USISRL = SLV_Addr;//(SLV_Addr | RWbit); // Build and transmit
address, R/W = 1
USICNT = (USICNT & 0xE0) + 0x08; // Bit counter = 8, TX Address
I2C_State = 2; // Go to next state: receive address (N)Ack
break;

case 2:
//Byte(address + R/W) just sent
//prep to recieve bit from slave, ack or nack
USICTL0 &= ~USIOE; // SDA = input
USICNT |= 0x01; // Bit counter = 1, receive (N)Ack bit
I2C_State = 4; // Go to next state: check (N)Ack
break;

case 4:
//bit just recieved
//RWbit=1->Read
//Ack ->prep to receive byte and continue communication
//Nack->prep for issuing STOP condition
//RWbit=0->Write
//prep to send byte
if (RWbit == 1){
//Read Code
if (USISRL & 0x01){
// If Nack received Prep Stop Condition
USICTL0 |= USIOE;
USISRL = 0x00;
USICNT |= 0x01; // Bit counter = 1, SCL high, SDA low
I2C_State = 10; // Go to next state:
}
else{
// Ack received, Receive Data from slave
USICNT |= 0x08; // Bit counter = 8, RX data
I2C_State = 6; // Go to next state:
}
}
else{
//Write Code
USISRL = 77;
USICTL0 |= USIOE; // SDA = output
USICNT |= 0x08; // TX a byte
I2C_State = 18;
}
break;

case 6:
//First Byte just recieved
//Formated display of data
//Prep to send N/Ack bit
USICTL0 |= USIOE; // SDA = output
dispGo(1,3);
formatAndSend(USISRL);
USICNT |= 0x01; // Bit counter = 1, send (N)Ack bit
I2C_State = 14; // Go to next state
break;

case 8:
//Bit just sent
//Prep Stop Condition
USICTL0 |= USIOE; // SDA = output
USISRL = 0x00;
USICNT |= 0x01; // Bit counter = 1, SCL high, SDA low
I2C_State = 10; // Go to next state: generate Stop
break;

case 10:
//coming from case 8 or 4 or __
//Generate Stop Condition
USISRL = 0x0FF; // USISRL = 1 to release SDA
USICTL0 |= USIGE; // Transparent latch enabled
USICTL0 &= ~(USIGE+USIOE); // Latch/SDA output disabled
I2C_State = 0; // Reset state machine for next transmission
LPM0_EXIT; // Exit active for next transfer
break;

case 14:
//Just sent bit
//Prep to recieve second byte
USICTL0 &= ~USIOE; // SDA = input
USICNT |= 0x08; // Bit counter = 8, RX data
I2C_State = 16; // Go to next state: Test data and (N)Ack
break;

case 16:
//Second Byte just recieved
//Formated display of data
//Prep to send N/Ack bit
USICTL0 |= USIOE; // SDA = output
dispGo(2,3);
formatAndSend(USISRL);
USICNT |= 0x01; // Bit counter = 1, send (N)Ack bit
I2C_State = 8; // Go to next state: prep stop
break;

case 18:
//Just wrote byte to slave
//prep to recieve bit
USICTL0 &= ~USIOE; // SDA = input
USICNT |= 0x01; // Bit counter = 1, receive (N)Ack bit
I2C_State = 20;
break;

case 20:
//just recieved bit
//prep to stop
USICTL0 |= USIOE;
USISRL = 0x00;
USICNT |= 0x01; // Bit counter = 1, SCL high, SDA low
I2C_State = 10; // Go to next state:
break;

}
USICTL1 &= ~USIIFG; // Clear pending flag
}

//
******************************************************************************
// Display routines for use with a HD44780 series display driver chip
// My display uses a HD44780A00
//
// PINOUT
// P1.0 E enable/clock
// P1.3 RS register select ,1=char data, 0=commands
// P1.4 DB4 data LSB
// P1.5 DB5
// P2.6 DB6
// P2.7 DB7 data MSB
//
******************************************************************************

void formatAndSend(char data){
//To turns an 8-bit unsigned integer value into
//three decimal digits and sends to display
char temp;
temp=(data/100)+0x30;
dispSend8(temp);
temp=((data/10)%10)+0x30;
dispSend8(temp);
temp=(data%10)+0x30;
dispSend8(temp);
}
void dispClear(int arg){
//arg Action
//--- ------------------
// 0 clear whole screen
// 1 clear first line
// 2 clear second line
//else clear whole screen
char i=0;
switch (arg){
case 1:
dispGo(1,1);
for(i=0;i<16; i++){
dispSend8(0x20);}
dispGo(1,1);
break;
case 2:
dispGo(2,1);
for(i=0;i<16; i++){
dispSend8(0x20);}
dispGo(2,1);
break;
case 0:
default:
rs = 0;
dispSend8(0x01);
rs = 1;
dispGo(1,1);
break;
}
}

void dispGo(int row, int col){
//Move cursor to row and column
char send=0;
send=(((row-1)*0x40)+(col-1))|0x80;
rs=0;
dispSend8(send);
rs=1;
}

void dispSend4(char data){
//takes the 4 MSB bits of data and formats for
//this pin set up
int pulsewidth;
if (rs==1) {pulsewidth=10;P1OUT |= 0x08;}//set the clock rate and set
the RS line
else {pulsewidth=50;P1OUT &= 0xf7;}

//set up the data output
P1OUT = ((0x30 & data) | (0xcf & P1OUT));
P2OUT = data; //six bits have no pins

//Pulse the E line
wait(pulsewidth); //wait time
P1OUT |= 0x01; //clock high
wait(pulsewidth); //wait time
P1OUT ^= 0x01; //clock low
}
void dispSend8(char data){
//breaks 8 bits into two 4 bit chunks for sending to the display
//lower 4 bits of sent data are ignored
dispSend4(data);
data= data<<4;
dispSend4(data);
}
void wait(int max){
int i=0;
for(i=0;i<max; i++); //wait time
}

Ian Daniher

unread,
Nov 18, 2010, 1:02:42 AM11/18/10
to TI Launchpad
Looks super-useful. Any chance you could pastebin or zip the code?

I'd like use your slave code for a CNC project.

Thanks a ton!
--
Ian

On Nov 15, 12:05 am, T_Shirt <tsch...@gmail.com> wrote:
> Okay I can't for the life of me find my last master code.  Here is the
> latest I have.  I doesn't support the variable length recieve that the
> slave does.  The stuff i can't find had the variable length recieve
> working.  YMMV.  Compiles with CCS in win XP in Virtual Box on a
> macbook runnng 10.5.8
> Lots of useful stuff here and the display routines can be lifted for
> other stuff too.
>
> //
> *************************************************************************** ***
> //      I2C Master Receiver,
> //      double byte read
> //      single byte write
> //
> //      5 OCT 2010

> //      Author:tsch...@gmail.com

T_Shirt

unread,
Nov 18, 2010, 7:05:22 PM11/18/10
to TI Launchpad
1)What is this pastebin you speak of?
2)Where would I send/post the zip file?

You may bend the code to your will for CNC or whatever.

Kevin Mark

unread,
Nov 19, 2010, 9:23:11 AM11/19/10
to ti-lau...@googlegroups.com
go to this site, follow the directions and give us a url to your code
http://pastebin.ca/

--
| .''`. == Debian GNU/Linux ==.| http://kevix.myopenid.com......|
| : :' : The Universal OS....| mysite.verizon.net/kevin.mark/.|
| `. `' http://www.debian.org/.| http://counter.li.org [#238656]|
|___`-____Unless I ask to be CCd,.assume I am subscribed._________|

Ian Daniher

unread,
Nov 19, 2010, 6:45:53 PM11/19/10
to TI Launchpad
Alternatively, feel free to stick your code, zipped, here:
http://itdnhr.com/upload
It's my personal server - I have it configured for dropbox-like use.
Best,
--
Ian

FCPK

unread,
Nov 23, 2010, 10:55:11 PM11/23/10
to TI Launchpad
Has anyone actually heard of any I2C master code on standard pins?(not
using the USI interface, since sometimes it can already be used for
something else)
Doesn't sound very hard but if something already exists, it'd be nice.

xBloodyxSkull

unread,
Nov 24, 2010, 2:40:43 AM11/24/10
to TI Launchpad
It is better to use a library or the example codes that you guys have
posted?

Joey

unread,
Nov 27, 2010, 1:22:00 PM11/27/10
to TI Launchpad
has anyone used the examples in the slac080h zip provided by TI? can
anone verify that they work, or provide some insight as to waht might
make them work on an msp430g2231? I have tried using the master and
slave examples, but they do not transmit properly for me.

On Nov 14, 10:05 pm, T_Shirt <tsch...@gmail.com> wrote:
> Okay I can't for the life of me find my last master code.  Here is the
> latest I have.  I doesn't support the variable length recieve that the
> slave does.  The stuff i can't find had the variable length recieve
> working.  YMMV.  Compiles with CCS in win XP in Virtual Box on a
> macbook runnng 10.5.8
> Lots of useful stuff here and the display routines can be lifted for
> other stuff too.
>
> //
> *************************************************************************** ***
> //      I2C Master Receiver,
> //      double byte read
> //      single byte write
> //
> //      5 OCT 2010

> //      Author:tsch...@gmail.com

T_Shirt

unread,
Nov 27, 2010, 3:44:37 PM11/27/10
to TI Launchpad

Sorry for the delay, I want the comments to be better but by the time
they are good enough no one will care. So I am posting as is and
may(probably not) post revised versions in at a later date.

Slave: http://pastebin.ca/2004021
Master: http://pastebin.ca/2004060

@ian
Sent a zip of the same stuff that is at pastebin.

@FCPK:
I2C on standard pins would be more difficult but could be done. It
would involve using interrupts on pins and timers with interrupts. I
believe this is called bit-banging.
I don't have that but could use it eventually. Since it overlaps with
the ADC. I wanted to use a G2231 as a 8 channel ADC that is accessed
by I2C. to get all 8 I would have to not use the USI or wait for a 20
pin chip(please TI).

xBloodyxSkull

unread,
Nov 27, 2010, 3:47:41 PM11/27/10
to TI Launchpad
Did you get my message T_Shirt?

Ian Daniher

unread,
Nov 29, 2010, 2:06:32 AM11/29/10
to TI Launchpad
Thanks a ton!

If anyone wants the files packaged in zip format, they're available at
http://itdnhr.com/static/TII2C.zip.

Best,
--
Ian

Mark_Hunsberger

unread,
Dec 4, 2010, 5:14:35 PM12/4/10
to TI Launchpad
@Ian...

I ordered this from Ti in hopes of using this for a project Cnc also.
What is your project going to be?

I would like to use the launchpad to communicate data from EMC2 on my
pc to a bipolar stepper driver via usb.

For the bipolar drive I am designing in the Ti Drv8811 stepper motor
driver. It can handle 2.5a continuously, which is overkill for my
application.

The end application is a 3-axis desktop router.

Hopefully the launchpad gets here soon, I can't wait anymore, It's
killing me.....

Ian Daniher

unread,
Dec 5, 2010, 7:25:58 PM12/5/10
to TI Launchpad
@Mark

I'm hoping to implement a slim servo control loop on the Launchpad,
with position data being input via I2C and feedback gathered via
either an AS5030 magnetic encoder or an optical encoder. The
inspiration comes from printer manufacturers, who, of late, have
exclusively turned from stepper motors to opto-encoded DC motors as a
cost saving measure.

Hopefully, if I can get something working, it'll be a useful
contribution to the reprap project.

Best,
--
Ian

Mark Hunsberger

unread,
Dec 6, 2010, 6:12:20 PM12/6/10
to ti-lau...@googlegroups.com
omg!
 
I didn't think the launchpad would be powerful enough for that.  Are you going to use one per axis, and run them all through a hub for isolation?  I intend to use the 10 giop to control the step, dir, enable, and home functions on my steppers through a TI  Drv8811 stepper driver, using the launchpad for the passthrough, because my laptop doesn't have a parallel port, and it is cheaper than an FDTI solution.  This is just an experiment to get my "feet wet" in cnc because I have no machine experience.  Stage 2, I intend to scale up and use some old plotter parts to make a bigger table.  The drive system will be worm reduction dc brushed car window motors for a closed loop servo control, but I intend to use a Microchip PIC18f2431 because the have a quadrature interface natively.  For the encoders, I intend to use optical ones from analog mice because people throw them out all the time.  Another reason for the Microchip solution would be their "lite" Ide is not code limited.  The only difference between the "free" version and the pay version is the difference in code optimization, which the free version does not have.  I really would like to follow your project, do you have a blog about it?  Also are you using EMC2 or Mach 3?

 
> Date: Sun, 5 Dec 2010 16:25:58 -0800
> Subject: Re: LaunchPad I2C Communication
> From: explod...@gmail.com
> To: ti-lau...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages