PMBUS implementations

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

PMBUS implementations

Chetan Bhargava
Hello all,


I have searched various forums and haven't come across any PMBUS
implementations on PIC. Is any one of you aware of any PMBUS
implementations on PIC as PMBUS master?
My application has to interface with LT2979 power controller that
talks on PMBUS.

Any pointers would be appreciated.

Thanks.


Chetan Bhargava
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: PMBUS implementations

Barry Gershenfeld-2
I did an implementation which talked to a power supply that claimed to use
the PMBUS protocol.  I first did some reading about PMBUS, and it appeared
to be fairly straight-forward i2c, with some added message formats.
Namely, things like a byte count being sent (well, read out),  followed by
the bytes themselves.  When I actually did the interface, I didn't have to
change my i2c code.  Registers were still just registers.  What I did have
to do was work out some of the formats they used to represent their data;
in particular, there is a 2-byte floating point format that provided some
entertainment.

On Wed, Aug 1, 2012 at 8:55 PM, Chetan Bhargava <[hidden email]> wrote:

> Hello all,
>
>
> I have searched various forums and haven't come across any PMBUS
> implementations on PIC. Is any one of you aware of any PMBUS
> implementations on PIC as PMBUS master?
> My application has to interface with LT2979 power controller that
> talks on PMBUS.
>
> Any pointers would be appreciated.
>
> Thanks.
>
>
> Chetan Bhargava <http://mailman.mit.edu/mailman/listinfo/piclist>
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Linker error

Steve Smith

Guys...

I have used this form before on an older chip and it worked

        org 2100h
        dt 000h,000h,034h,093h,0BEh,0A0h,018h,000h,01Eh,0A4h,055h,008h
        dt 01Dh,0DCh,01Dh,014h,01Ch,04Ch,01Bh,084h,01Ah,0BCh,019h,0F4h

That was on a 877... Now on a pic16f1827 its spitting a linker problem

MPLINK 4.43, Linker
Device Database Version 1.9
Copyright (c) 1998-2011 Microchip Technology Inc.
Error - section '.org_3' can not fit the absolute section. Section '.org_3'
start=0x00002100, length=0x00000030
Errors    : 1

Link step failed.

I cant see anything wrong its not too long and the memory is where its
supposed to be

Anybody any ideas...

Thanks
Steve

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: Linker error

Gál Zsolt
Hello,

I am using 'dt' for creating data tables in program memory, so it
generates 14 bit words. It looks like for me that you would like to
create a data table in the eeprom memory. If you see the technical
documentation for mpasm, you will find the 'de' for data entry in
eeprom memory.
If I were you, I make it in this way:

         org     2100h
         de      000h,000h,034h,093h,0BEh,0A0h,018h,000h,01Eh,0A4h,055h,008h
         de     01Dh,0DCh,01Dh,014h,01Ch,04Ch,01Bh,084h,01Ah,0BCh,019h,0F4h

Zsolt

2012/8/11 Steve Smith <[hidden email]>:

>
> Guys...
>
> I have used this form before on an older chip and it worked
>
>         org     2100h
>         dt      000h,000h,034h,093h,0BEh,0A0h,018h,000h,01Eh,0A4h,055h,008h
>         dt      01Dh,0DCh,01Dh,014h,01Ch,04Ch,01Bh,084h,01Ah,0BCh,019h,0F4h
>
> That was on a 877... Now on a pic16f1827 its spitting a linker problem
>
> MPLINK 4.43, Linker
> Device Database Version 1.9
> Copyright (c) 1998-2011 Microchip Technology Inc.
> Error - section '.org_3' can not fit the absolute section. Section '.org_3'
> start=0x00002100, length=0x00000030
> Errors    : 1
>
> Link step failed.
>
> I cant see anything wrong its not too long and the memory is where its
> supposed to be
>
> Anybody any ideas...
>
> Thanks
> Steve
>
> --
> http://www.piclist.com PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist



--
~~~~~~~~~~~~~~~~
http://galzsolt.zzl.org
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: Linker error

Gál Zsolt
Oh! Another problem. In the standard PIC like 16F877 the eeprom memory
defined for the 2100h address. In the enhanced core devices it is at
the address of 0F000h .



2012/8/12 Gál Zsolt <[hidden email]>:

> Hello,
>
> I am using 'dt' for creating data tables in program memory, so it
> generates 14 bit words. It looks like for me that you would like to
> create a data table in the eeprom memory. If you see the technical
> documentation for mpasm, you will find the 'de' for data entry in
> eeprom memory.
> If I were you, I make it in this way:
>
>          org     2100h
>          de      000h,000h,034h,093h,0BEh,0A0h,018h,000h,01Eh,0A4h,055h,008h
>          de     01Dh,0DCh,01Dh,014h,01Ch,04Ch,01Bh,084h,01Ah,0BCh,019h,0F4h
>
> Zsolt
>
> 2012/8/11 Steve Smith <[hidden email]>:
>>
>> Guys...
>>
>> I have used this form before on an older chip and it worked
>>
>>         org     2100h
>>         dt      000h,000h,034h,093h,0BEh,0A0h,018h,000h,01Eh,0A4h,055h,008h
>>         dt      01Dh,0DCh,01Dh,014h,01Ch,04Ch,01Bh,084h,01Ah,0BCh,019h,0F4h
>>
>> That was on a 877... Now on a pic16f1827 its spitting a linker problem
>>
>> MPLINK 4.43, Linker
>> Device Database Version 1.9
>> Copyright (c) 1998-2011 Microchip Technology Inc.
>> Error - section '.org_3' can not fit the absolute section. Section '.org_3'
>> start=0x00002100, length=0x00000030
>> Errors    : 1
>>
>> Link step failed.
>>
>> I cant see anything wrong its not too long and the memory is where its
>> supposed to be
>>
>> Anybody any ideas...
>>
>> Thanks
>> Steve
>>
>> --
>> http://www.piclist.com PIC/SX FAQ & list archive
>> View/change your membership options at
>> http://mailman.mit.edu/mailman/listinfo/piclist
>
>
>
> --
> ~~~~~~~~~~~~~~~~
> http://galzsolt.zzl.org



--
~~~~~~~~~~~~~~~~
http://galzsolt.zzl.org

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

RE: Linker error

Steve Smith
Thank You Thank You

I had already tried 'de' and 'dt' these can be interchanged the bit I was
missing was Microchip had moved the memory....


Thanks
Steve


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of
Gál Zsolt
Sent: 12 August 2012 06:41
To: Microcontroller discussion list - Public.
Subject: Re: [PIC]Linker error

Oh! Another problem. In the standard PIC like 16F877 the eeprom memory
defined for the 2100h address. In the enhanced core devices it is at
the address of 0F000h .



--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: Linker error

Jan-Erik Söderholm
In reply to this post by Steve Smith


Steve Smith wrote 2012-08-11 23:34:
>
> Guys...
>
> I have used this form before on an older chip and it worked
>
> org 2100h
> dt 000h,000h,034h,093h,0BEh,0A0h,018h,000h,01Eh,0A4h,055h,008h
> dt 01Dh,0DCh,01Dh,014h,01Ch,04Ch,01Bh,084h,01Ah,0BCh,019h,0F4h
>

It sort of "works" by it's wrong anyway... :-)
Having hardcoded addresses in the code makes porting code
between models harder. Using the tools in relocatable code
is the way to go.

The code below works without code changes to the data allocation
part on both 16F877(A) and 16F1827 :

---------------------------------
deeprom  code

myeedata dt 000h,000h,034h,093h,0BEh,0A0h,018h,000h,01Eh,0A4h,055h,008h
          dt 01Dh,0DCh,01Dh,014h,01Ch,04Ch,01Bh,084h,01Ah,0BCh,019h,0F4h
---------------------------------

See the LKR files for the definition of "deeprom".

By only changing the list/#include lines (and the "Configue"->"Select
Device" in MPLAB), it produces an allocation at the correct adresses:

För the 16F887(A) :

  Symbols - Sorted by Name
  Name      Address    Location  Storage   File
  --------- ---------  --------- --------- ---------
  MYEEDATA  0x002100   program   static    D:\......


For the 16F1827 :

  Symbols - Sorted by Name
  Name      Address    Location  Storage   File
  --------- ---------  --------- --------- ---------
  MYEEDATA  0x00f000   program   static    D:\......


And the HEX file(s) is creates accordingly :

16F887A
:040000000034003494
:104200000034003434349334BE34A03418340034D1
:104210001E34A434553408341D34DC341D341434B5
:104220001C344C341B3484341A34BC341934F43404
:00000001FF

16F1827:
:020000040000FA:020000040000FA
:040000000034003494
:020000040001F9
:10E000000034003434349334BE34A0341834003433
:10E010001E34A434553408341D34DC341D34143417
:10E020001C344C341B3484341A34BC341934F43466
:00000001FF


 > the bit I was
 > missing was Microchip had moved the memory....

You doesn't *have* to know... :-)
You use the symbol MYEEDATA to load the EEPROM address
to register EEADRL as usual.

Regards,
Jan-Erik.

> That was on a 877... Now on a pic16f1827 its spitting a linker problem
>
> MPLINK 4.43, Linker
> Device Database Version 1.9
> Copyright (c) 1998-2011 Microchip Technology Inc.
> Error - section '.org_3' can not fit the absolute section. Section '.org_3'
> start=0x00002100, length=0x00000030
> Errors    : 1
>
> Link step failed.
>
> I cant see anything wrong its not too long and the memory is where its
> supposed to be
>
> Anybody any ideas...
>
> Thanks
> Steve
>
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: PMBUS implementations

Chetan Bhargava
In reply to this post by Barry Gershenfeld-2
Hi Barry,

Thanks for the information. After reading much about PMBUS it seems
that it should be straight forward. I still have some confusion about
PEC. Documents say it is not mandatory. Also lot of people make a
lookup table for PEC instead of calculating it.

I have my i2c code working in PIC.

Thanks for the helpful hints.


Chetan Bhargava
http://microz.blogspot.com


On Wed, Aug 8, 2012 at 12:59 PM, Barry Gershenfeld <[hidden email]> wrote:

> I did an implementation which talked to a power supply that claimed to use
> the PMBUS protocol.  I first did some reading about PMBUS, and it appeared
> to be fairly straight-forward i2c, with some added message formats.
> Namely, things like a byte count being sent (well, read out),  followed by
> the bytes themselves.  When I actually did the interface, I didn't have to
> change my i2c code.  Registers were still just registers.  What I did have
> to do was work out some of the formats they used to represent their data;
> in particular, there is a 2-byte floating point format that provided some
> entertainment.
>
> On Wed, Aug 1, 2012 at 8:55 PM, Chetan Bhargava <[hidden email]> wrote:
>
>> Hello all,
>>
>>
>> I have searched various forums and haven't come across any PMBUS
>> implementations on PIC. Is any one of you aware of any PMBUS
>> implementations on PIC as PMBUS master?
>> My application has to interface with LT2979 power controller that
>> talks on PMBUS.
>>
>> Any pointers would be appreciated.
>>
>> Thanks.
>>
>>
>> Chetan Bhargava <http://mailman.mit.edu/mailman/listinfo/piclist>
> --
> http://www.piclist.com PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: PMBUS implementations

Barry Gershenfeld-2
A lot of the time they get "lazy" and don't implement PEC.  The supply I
worked with didn't require it.

The data sheet should say what's expected.  I tried to find LT2979, but
there are no matches, not even on Linear's site.  And you didn't say what
it did, so I couldn't find it by guessing and working backwards.


On Tue, Aug 14, 2012 at 1:01 PM, Chetan Bhargava <[hidden email]>wrote:

> Hi Barry,
>
> Thanks for the information. After reading much about PMBUS it seems
> that it should be straight forward. I still have some confusion about
> PEC. Documents say it is not mandatory. Also lot of people make a
> lookup table for PEC instead of calculating it.
>
> I have my i2c code working in PIC.
>
> Thanks for the helpful hints.
>
>
> Chetan Bhargava
> http://microz.blogspot.com
>
>
> On Wed, Aug 8, 2012 at 12:59 PM, Barry Gershenfeld <[hidden email]>
> wrote:
> > I did an implementation which talked to a power supply that claimed to
> use
> > the PMBUS protocol.  I first did some reading about PMBUS, and it
> appeared
> > to be fairly straight-forward i2c, with some added message formats.
> > Namely, things like a byte count being sent (well, read out),  followed
> by
> > the bytes themselves.  When I actually did the interface, I didn't have
> to
> > change my i2c code.  Registers were still just registers.  What I did
> have
> > to do was work out some of the formats they used to represent their data;
> > in particular, there is a 2-byte floating point format that provided some
> > entertainment.
> >
> > On Wed, Aug 1, 2012 at 8:55 PM, Chetan Bhargava <[hidden email]>
> wrote:
> >
> >> Hello all,
> >>
> >>
> >> I have searched various forums and haven't come across any PMBUS
> >> implementations on PIC. Is any one of you aware of any PMBUS
> >> implementations on PIC as PMBUS master?
> >> My application has to interface with LT2979 power controller that
> >> talks on PMBUS.
> >>
> >> Any pointers would be appreciated.
> >>
> >> Thanks.
> >>
> >>
> >> Chetan Bhargava <http://mailman.mit.edu/mailman/listinfo/piclist>
> > --
>
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

RE: PMBUS implementations

Alan Pearce - UKRI STFC
> A lot of the time they get "lazy" and don't implement PEC.  The supply I worked with
> didn't require it.
>
> The data sheet should say what's expected.  I tried to find LT2979, but there are no
> matches, not even on Linear's site.  And you didn't say what it did, so I couldn't
> find it by guessing and working backwards.

I suspect he means this chip ...
http://www.linear.com/product/LTC2978

found by going through the parametric search under "digital power management" ...


--
Scanned by iCritical.

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: PMBUS implementations

Chetan Bhargava
Thanks Alan,

The chip indeed is LT2978. Sorry for the typo.

Regards,

Chetan Bhargava
http://microz.blogspot.com


On Thu, Aug 16, 2012 at 1:21 AM,  <[hidden email]> wrote:

>> A lot of the time they get "lazy" and don't implement PEC.  The supply I worked with
>> didn't require it.
>>
>> The data sheet should say what's expected.  I tried to find LT2979, but there are no
>> matches, not even on Linear's site.  And you didn't say what it did, so I couldn't
>> find it by guessing and working backwards.
>
> I suspect he means this chip ...
> http://www.linear.com/product/LTC2978
>
> found by going through the parametric search under "digital power management" ...
>
>
> --
> Scanned by iCritical.
>
> --
> http://www.piclist.com PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist