MCP23008 I2C 8-bit I/O Expander Swordfish Module

Coding and general discussion relating to user created compiler modules

Moderators: David Barker, Jerry Messina

Post Reply
Jon Chandler
Registered User
Registered User
Posts: 185
Joined: Mon Mar 10, 2008 8:20 am
Location: Seattle, WA USA
Contact:

MCP23008 I2C 8-bit I/O Expander Swordfish Module

Post by Jon Chandler » Sun Nov 28, 2010 11:17 pm

I've completed a Swordfish module for the MCP23008 I/O Expander chip. This part effectively adds an 8-bit port to your microcontroller using a 2-wire I2C interface that may be shared with many other chips.

The module makes it easy to use the MCP23008 with commands similar to standard Swordfish commands while relieving the user from dealing with the I2C protocol.

You can find it here.

W4GNS
Registered User
Registered User
Posts: 29
Joined: Wed Nov 03, 2010 7:18 pm
Location: Occupied South (Virginia)

Post by W4GNS » Mon Nov 29, 2010 1:01 am

Jon, Thanks for sharing
Gary W4GNS

PhilJ2
Posts: 8
Joined: Sun Aug 09, 2009 4:56 pm
Location: Toronto, Canada

Problem

Post by PhilJ2 » Wed Dec 01, 2010 6:55 pm

I simply copied your demo code and mcp23008 module into two seperate files, with no code changes.
When I try to compile, it stops at line 220 of the module, the error msg reads
mcp23008.bas(220):Symbol not expected.

Any ideas ?

I'm using SF v 2.2.0.4 - ICC1.1.5.5

gramo
Registered User
Registered User
Posts: 200
Joined: Tue Mar 20, 2007 6:55 am
Location: Australia
Contact:

Post by gramo » Wed Dec 01, 2010 7:41 pm

Try it now Phil - Looks like the code had spaces stripped in some areas?
digital-diy.com - Hobby microcontroller projects and tutorials. Assembly, PICBasic and C examples.

Australian distributor for the Swordfish Compiler

Jon Chandler
Registered User
Registered User
Posts: 185
Joined: Mon Mar 10, 2008 8:20 am
Location: Seattle, WA USA
Contact:

Post by Jon Chandler » Wed Dec 01, 2010 8:36 pm

Thanks for looking into this Graham! Hopefully that's solved it.

I'm rushing out the door right now but I'll investigate tonight.


Jon

PhilJ2
Posts: 8
Joined: Sun Aug 09, 2009 4:56 pm
Location: Toronto, Canada

That fixed it

Post by PhilJ2 » Wed Dec 01, 2010 8:40 pm

Thanks

Post Reply