SB70 misused as a GPIO device

Discussion to talk about hardware related topics only.
Post Reply
User avatar
sb70koll
Posts: 35
Joined: Wed Oct 08, 2008 12:43 pm

SB70 misused as a GPIO device

Post by sb70koll »

Hi,

I need two GPIO pin on a sb70 device.

The situation is this: I have a simple home automation project to monitor my electricty and water consumption. The devices I've build produces pulses with a specific duration. I want to start a timer on a pos or neg flank of a signal coming from this devices and want to collect the duration. At the moment, I need to use a PICAXE or Parallax Basic Stamp II for this and send the values via RS232 TTL to the sb70. It would be nice to get this done by the sb70 device itself.

Please any input!

Kind regards,

sb70koll
Kind regards, sb70koll
Simplicity is my middle name - Danny Glover - Predator II
User avatar
sb70koll
Posts: 35
Joined: Wed Oct 08, 2008 12:43 pm

Re: SB70 misused as a GPIO device

Post by sb70koll »

No input?
Kind regards, sb70koll
Simplicity is my middle name - Danny Glover - Predator II
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: SB70 misused as a GPIO device

Post by rnixon »

What are the characteristics of the gpio requirements? What current/voltage for the output, what is the voltage for the input? The SB70 is 3.3V only.
User avatar
lgitlitz
Posts: 331
Joined: Wed Apr 23, 2008 11:43 am
Location: San Diego, CA
Contact:

Re: SB70 misused as a GPIO device

Post by lgitlitz »

There are a few signals you can use as GPIO. For your incoming signal you should probably use pin 6 of the J1 connector. This connects to the DMA Timer 1 input. You can then configure this peripheral to do things such as trigger an interrupt or count pulses. You then can then configure most of the J4 signals to be GPIO. J4[1] = GND, J4[2] = QSPI_DOUT, J4[3] = QSPI_CLK, J4[4] = QSPI_DIN, J4[5] = QSPI_CS3. All the QSPI signals can be used as GPIO, read chapter 12 of the freescale MCF5271RM for more info. You can also configure the J5 signals to be GPIO if you are not using both serial ports or do not need the hardware flow control signals for one of the UARTs.

-Larry
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: SB70 misused as a GPIO device

Post by rnixon »

You still need to know the external circuit current and voltage specs first.
5V signal on SB70 = Dead SB70
Kiwinet
Posts: 31
Joined: Wed Jun 24, 2009 4:20 am

Re: SB70 misused as a GPIO device

Post by Kiwinet »

To make electricity wattage consumption measurements, I suggest using a current transformer with a ratio of 1000:1 . Lets say if 20 amps is your maximum consumption (before tripping a circuitbreaker or fuse :lol: ) then the chosen CT will therefore proportionally output 20mA.
Then this 20mA would be fed into a suitable voltage divider giving 3.3V for max input, 1.65V for 1/2 input..etc.. well you get the idea!

For selecting a suitable CT for your measurement application try
http://www.u-rd.com/english/products/ac/ac_1.html for some reference data.
User avatar
sb70koll
Posts: 35
Joined: Wed Oct 08, 2008 12:43 pm

Re: SB70 misused as a GPIO device

Post by sb70koll »

Thanks a lot for the information about the GPIO's.

I was a long time off the electronic grid. Nothing serious, I just had to make a choice between other interests above electronics.

Now I'm starting all over from scratch with this device again. I hope my old SDK (2008) will run on Windows 7, 64 bit.
Kind regards, sb70koll
Simplicity is my middle name - Danny Glover - Predator II
User avatar
sb70koll
Posts: 35
Joined: Wed Oct 08, 2008 12:43 pm

Re: SB70 misused as a GPIO device

Post by sb70koll »

Ok, I got my old 2008 SDK version running. I had to use java version update 6.45. Version 7 doesn't work. No I have to see if something will compile. Autoupdate works.
Kind regards, sb70koll
Simplicity is my middle name - Danny Glover - Predator II
Post Reply