Shop OBEX P1 Docs P2 Docs Learn Events
20*log(a/b) caculation — Parallax Forums

20*log(a/b) caculation

ArchiverArchiver Posts: 46,084
edited 2000-07-21 20:58 in General Discussion
I have a application of calulating LOG function, I know PAK-2 math co-processor
can do this, How
do I connect this PAK 2 with BS2 ? After calulation I need send out to 16*1 LCD
. Is there anyone
help me out ? I have some experience of BS2, but how the BS2 know floating
point math when I
connect PAK2 ?

Sorry ! I have no idea of PAK2 .

TIA

Baker

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-07-21 02:58
    goto to the all williams web site, they have onling documentation explaining
    how to interface to a stamp or pic, both look very easy and straight
    forward.

    Norm & Monda
    Cozy MK IV #202
    Ford V-6 Powered
    Original Message
    From: <baker_bai@c...>
    To: <basicstamps@egroups.com>
    Sent: Thursday, July 20, 2000 8:45 PM
    Subject: [noparse][[/noparse]basicstamps] 20*log(a/b) caculation


    >
    > I have a application of calulating LOG function, I know PAK-2 math
    co-processor can do this, How
    > do I connect this PAK 2 with BS2 ? After calulation I need send out to
    16*1 LCD . Is there anyone
    > help me out ? I have some experience of BS2, but how the BS2 know
    floating point math when I
    > connect PAK2 ?
    >
    > Sorry ! I have no idea of PAK2 .
    >
    > TIA
    >
    > Baker
    >
    >
    >
    >
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2000-07-21 03:22
    You may not have to use an external floating point unit. Tracy Allen has a
    page that shows some ways to do logs within the restraints of the stamp's
    integer math:

    http://ourworld.compuserve.com/homepages/emesys/BS2index.htm

    Best, Duncan
  • ArchiverArchiver Posts: 46,084
    edited 2000-07-21 20:58
    The PAK II uses SHIFTIN and SHIFTOUT to communication with the Stamp. We
    provide a small library that allows you make calls like:

    gosub floadx
    gosub flog

    To do the work. Sending the data out to the LCD could be done using the
    fdump command (changing debug to serout -- assuming a serial LCD) or you
    could convert it to an integer (FInt).

    You can find the manual and many examples in the document library at
    http://www.al-williams.com/awce/doclib.htm

    Regards,

    Al Williams
    AWC


    >
    Original Message
    > From: baker_bai@c... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=bNzKDEY7o7KHr3QZWKIa6ld4tDhwF_r9fjTgScZf0Y8gzB8Fs9T8gxnaEsBLeXr-km-j8jQaa7t5uTenFw]baker_bai@c...[/url
    > Sent: Thursday, July 20, 2000 7:46 PM
    > To: basicstamps@egroups.com
    > Subject: [noparse][[/noparse]basicstamps] 20*log(a/b) caculation
    >
    >
    >
    > I have a application of calulating LOG function, I know PAK-2
    > math co-processor can do this, How
    > do I connect this PAK 2 with BS2 ? After calulation I need send
    > out to 16*1 LCD . Is there anyone
    > help me out ? I have some experience of BS2, but how the BS2
    > know floating point math when I
    > connect PAK2 ?
    >
    > Sorry ! I have no idea of PAK2 .
    >
    > TIA
    >
    > Baker
    >
    >
    >
    >
    >
Sign In or Register to comment.