Re: [psas-avionics] Need help understanding SMBus

2012-03-07 Thread Keith Parker
Andrew,

I think this may be what you want,
or at least give you some leads.

Application Report
How to Operate bq20z7x/8x/9x Fuel Gauge and bq24707/25/26 Charger w/o
Host Cntroller
SLUA608 – PDF   153.2KB 2011-08-31 (6 pages)
http://www.ti.com/lit/an/slua608/slua608.pdf

Thanks,
Keith

==
On Tue, Mar 6, 2012 at 11:56 PM, Andrew Greenberg  wrote:
> Hi!
>
> If there is someone out there who actually understands how SMBus works
> in an real system, could you please email me? Or if you know someone who
> knows, could you have them email me?
>
> We're trying to hunt down these questions:
>
> - You have a smart battery and smart battery charger on the same SMBus.
> But something has to tell the smart battery charger to actually start
> charging? If so, who does this? Who asks the battery about its charge
> rate and capacity, checks that there's sufficient shore power, and then
> turns on battery charging? Is this the "embedded controller"?
>
> - Assuming it's the "embedded controller" that does this coordination,
> especially when the host is off, are there generic controllers out
> there? Or does everyone just throw a microcontroller at this?
>
> Thanks!
>
> Andrew
>
> --
> ---
> Andrew Greenberg
>
> Portland State Aerospace Society (http://psas.pdx.edu/)
> and...@psas.pdx.edu  C: 503.708.7711
> ---
>
> ___
> psas-avionics mailing list
> psas-avionics@lists.psas.pdx.edu
> http://lists.psas.pdx.edu/mailman/listinfo/psas-avionics

___
psas-avionics mailing list
psas-avionics@lists.psas.pdx.edu
http://lists.psas.pdx.edu/mailman/listinfo/psas-avionics


[psas-avionics] Need help understanding SMBus

2012-03-07 Thread Andrew Greenberg
Hi!

If there is someone out there who actually understands how SMBus works
in an real system, could you please email me? Or if you know someone who
knows, could you have them email me?

We're trying to hunt down these questions:

- You have a smart battery and smart battery charger on the same SMBus.
But something has to tell the smart battery charger to actually start
charging? If so, who does this? Who asks the battery about its charge
rate and capacity, checks that there's sufficient shore power, and then
turns on battery charging? Is this the "embedded controller"?

- Assuming it's the "embedded controller" that does this coordination,
especially when the host is off, are there generic controllers out
there? Or does everyone just throw a microcontroller at this?

Thanks!

Andrew

-- 
---
Andrew Greenberg

Portland State Aerospace Society (http://psas.pdx.edu/)
and...@psas.pdx.edu  C: 503.708.7711
---

___
psas-avionics mailing list
psas-avionics@lists.psas.pdx.edu
http://lists.psas.pdx.edu/mailman/listinfo/psas-avionics


Re: [psas-avionics] need help

2011-09-17 Thread Nagasrinivas Pinjala
Thanks Dave !




From: Dave Camarillo 
To: Nagasrinivas Pinjala 
Cc: psas-avionics 
Sent: Friday, September 16, 2011 10:26 PM
Subject: Re: [psas-avionics] need help

Hi Naga,

A couple of notes and comments that should be helpful...

-On the LPC series of MCU's, you'll be looking for the pins that can
be configured as EINT# pins. These will allow for a state change on
the input pin to trigger an interrupt handler on the MCU.

-In the manual, there is a section on the vectored interrupt
controller. It will be critical that you read and understand this
chapter. The general process is to assign the address of the function
handler to the respective VIC register, configure the peripheral, and
enable the interrupt.

-When implementing the interrupt function, it's almost identical to a
normal function, however the function prolong and epilogue is modified
with compiler directives and/or assembler code. An example can be
found in the psas freertos-5.1.2 repo, under
LPCUSBIntegrationTesting/usb.c. There are two primary methods of
modifying the function. The first is using the compiler directive,
which may or may not be broken, depending on the version of gcc your
running. The second is to mark the function as naked and provide
assembler instructions at the beginning and end of the function to
save and restore context.


I think this should get you started in the right direction...


Regards,
-Dave


On Fri, Sep 16, 2011 at 7:52 PM, Nagasrinivas Pinjala
 wrote:
> Hi,
>
> I wish to write an interrupt based program for LPC2378 board. It involves
> one of the two user buttons and the LED. Following is the algorithm for the
> program:
> 1.Choose a button
> 2.Set the relevant pin as the input
> 3.Check if the button is pressed
>    if yes - send an interrupt to the micro-controller which then lights the
> LED
>    if no - do nothing
> I need guidance as to how to write an interrupt function in C, what are the
> compiler directives, and what are the registers I need to deal with.
> Any help would be greatly appreciated.
>
> Thanks,
> Naga.
>
> ___
> psas-avionics mailing list
> psas-avionics@lists.psas.pdx.edu
> http://lists.psas.pdx.edu/mailman/listinfo/psas-avionics
>
>___
psas-avionics mailing list
psas-avionics@lists.psas.pdx.edu
http://lists.psas.pdx.edu/mailman/listinfo/psas-avionics


Re: [psas-avionics] need help

2011-09-17 Thread Nagasrinivas Pinjala
Thanks a lot, K!




From: K Wilson 
To: Nagasrinivas Pinjala 
Cc: psas-avionics 
Sent: Saturday, September 17, 2011 9:35 AM
Subject: Re: [psas-avionics] need help


On Fri, Sep 16, 2011 at 7:52 PM, Nagasrinivas Pinjala  
wrote:

>
>I need guidance as to how to write an interrupt function in C, what are the 
>compiler directives, and what are the registers I need to deal with.
>
>
On function attributes in gcc:
 http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#Function-Attributes

As another example you can look at the 
liblpc23xx/lpc23xx-i2c/lpc23xx-i2c.c 
and liblpc23xx/lpc23xx-i2c/include/lpc23xx-i2c.h
files. The interrupt routine is i2c0_isr(). The interrupt initialization is in 
the 
i2c_init(...) function.

   -K___
psas-avionics mailing list
psas-avionics@lists.psas.pdx.edu
http://lists.psas.pdx.edu/mailman/listinfo/psas-avionics


Re: [psas-avionics] need help

2011-09-17 Thread K Wilson
On Fri, Sep 16, 2011 at 7:52 PM, Nagasrinivas Pinjala wrote:

>
> I need guidance as to how to write an interrupt function in C, what are the
> compiler directives, and what are the registers I need to deal with.
>
>
On function attributes in gcc:

http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#Function-Attributes

As another example you can look at the
liblpc23xx/lpc23xx-i2c/lpc23xx-i2c.c
and liblpc23xx/lpc23xx-i2c/include/lpc23xx-i2c.h
files. The interrupt routine is i2c0_isr(). The interrupt initialization is
in the
i2c_init(...) function.

   -K
___
psas-avionics mailing list
psas-avionics@lists.psas.pdx.edu
http://lists.psas.pdx.edu/mailman/listinfo/psas-avionics


Re: [psas-avionics] need help

2011-09-16 Thread Dave Camarillo
Hi Naga,

A couple of notes and comments that should be helpful...

-On the LPC series of MCU's, you'll be looking for the pins that can
be configured as EINT# pins. These will allow for a state change on
the input pin to trigger an interrupt handler on the MCU.

-In the manual, there is a section on the vectored interrupt
controller. It will be critical that you read and understand this
chapter. The general process is to assign the address of the function
handler to the respective VIC register, configure the peripheral, and
enable the interrupt.

-When implementing the interrupt function, it's almost identical to a
normal function, however the function prolong and epilogue is modified
with compiler directives and/or assembler code. An example can be
found in the psas freertos-5.1.2 repo, under
LPCUSBIntegrationTesting/usb.c. There are two primary methods of
modifying the function. The first is using the compiler directive,
which may or may not be broken, depending on the version of gcc your
running. The second is to mark the function as naked and provide
assembler instructions at the beginning and end of the function to
save and restore context.


I think this should get you started in the right direction...


Regards,
-Dave


On Fri, Sep 16, 2011 at 7:52 PM, Nagasrinivas Pinjala
 wrote:
> Hi,
>
> I wish to write an interrupt based program for LPC2378 board. It involves
> one of the two user buttons and the LED. Following is the algorithm for the
> program:
> 1.Choose a button
> 2.Set the relevant pin as the input
> 3.Check if the button is pressed
>    if yes - send an interrupt to the micro-controller which then lights the
> LED
>    if no - do nothing
> I need guidance as to how to write an interrupt function in C, what are the
> compiler directives, and what are the registers I need to deal with.
> Any help would be greatly appreciated.
>
> Thanks,
> Naga.
>
> ___
> psas-avionics mailing list
> psas-avionics@lists.psas.pdx.edu
> http://lists.psas.pdx.edu/mailman/listinfo/psas-avionics
>
>

___
psas-avionics mailing list
psas-avionics@lists.psas.pdx.edu
http://lists.psas.pdx.edu/mailman/listinfo/psas-avionics


[psas-avionics] need help

2011-09-16 Thread Nagasrinivas Pinjala
Hi, 


I wish to write an interrupt based program for LPC2378 board. It involves one 
of the two user buttons and the LED. Following is the algorithm for the program:

1.Choose a button
2.Set the relevant pin as the input
3.Check if the button is pressed 

   if yes - send an interrupt to the micro-controller which then lights the LED
   if no - do nothing

I need guidance as to how to write an interrupt function in C, what are the 
compiler directives, and what are the registers I need to deal with.

Any help would be greatly appreciated. 


Thanks,
Naga.
___
psas-avionics mailing list
psas-avionics@lists.psas.pdx.edu
http://lists.psas.pdx.edu/mailman/listinfo/psas-avionics


Re: [psas-avionics] Need help with the IMU calibrator!

2008-01-04 Thread mark gross
On Wed, Jan 02, 2008 at 09:26:10PM -0800, Andrew Greenberg wrote:
> Hey everyone!
> 
> A billion years ago, Tim and I made a spin table for calibrating
> gyroscopes. Dan *just* got it to work using a bunch of his PIC/CAN
> tools. Dave has now volunteered to port it to the LPC, but we need to
> hack an LPC2148 board to get this to work.
> 
> We have a beginning schematic, and we need someone to finish up the
> schematic (very easy, trust us), work with Dave to figure out exact pin
> out, and then solder up the whole thing. It's about 5+ hours of
> soldering, I think.
> 
> I'd totally do it, but I don't have time, and this is a GREAT first
> project for someone.
> 
> Anyone interested!

I am.  BTW I'll be on campus this saterday for a PARTS meeting.  I could
meet up with Dave around 3pm (at Hotlips?) and spend a few hrs on this.

--mgross

> 
> Andrew
> 
> -- 
> ---
> Andrew Greenberg
> 
> Portland State Aerospace Society (http://psas.pdx.edu/)
> [EMAIL PROTECTED]  P: 503.788.1343  C: 503.708.7711
> ---
> 
> ___
> psas-avionics mailing list
> psas-avionics@lists.psas.pdx.edu
> http://lists.psas.pdx.edu/mailman/listinfo/psas-avionics


signature.asc
Description: Digital signature
___
psas-avionics mailing list
psas-avionics@lists.psas.pdx.edu
http://lists.psas.pdx.edu/mailman/listinfo/psas-avionics


[psas-avionics] Need help with the IMU calibrator!

2008-01-02 Thread Andrew Greenberg
Hey everyone!

A billion years ago, Tim and I made a spin table for calibrating
gyroscopes. Dan *just* got it to work using a bunch of his PIC/CAN
tools. Dave has now volunteered to port it to the LPC, but we need to
hack an LPC2148 board to get this to work.

We have a beginning schematic, and we need someone to finish up the
schematic (very easy, trust us), work with Dave to figure out exact pin
out, and then solder up the whole thing. It's about 5+ hours of
soldering, I think.

I'd totally do it, but I don't have time, and this is a GREAT first
project for someone.

Anyone interested!

Andrew

-- 
---
Andrew Greenberg

Portland State Aerospace Society (http://psas.pdx.edu/)
[EMAIL PROTECTED]  P: 503.788.1343  C: 503.708.7711
---

___
psas-avionics mailing list
psas-avionics@lists.psas.pdx.edu
http://lists.psas.pdx.edu/mailman/listinfo/psas-avionics