Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.electronics.design > #503345

Re: OT: PIC16 divide and/or multiply routines

From Terry Newton <nbill@bellsouth.net>
Newsgroups sci.electronics.design
Subject Re: OT: PIC16 divide and/or multiply routines
Date 2018-04-24 05:12 +0000
Organization Aioe.org NNTP Server
Message-ID <pbmec9$14pv$1@gioia.aioe.org> (permalink)
References <xvYYx.43198$Iw3.9957@fx30.iad> <4a9c4182-fe21-4b20-a35e-9c24e7b56d6a@googlegroups.com>

Show all headers | View raw


On Mon, 23 Apr 2018 08:48:05 -0700, ramiserhan77 wrote:

> hey guys just i want to ask you, how is floating point represented in
> assembly for pic16, for example if i wanna save a value of 1.623 in
> memory, how can i save it using the 36 assembly instructions in pic16?

You don't, PIC16 chips do 8-bit addition subtraction and logic and
not much else, multiplication division etc have to be implemented
as subroutines. 16-bit math sub libraries are common but never needed
floating point on such a small processor, if I did I'd make up my
own fixed-point format (or just store as an integer multiple).
When I need true floats I use a PIC18F part like the PIC18F2525
and program it in C, the free SDCC compiler works for me.

Terry

Back to sci.electronics.design | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: OT: PIC16 divide and/or multiply routines ramiserhan77@gmail.com - 2018-04-23 08:48 -0700
  Re: OT: PIC16 divide and/or multiply routines bill.sloman@ieee.org - 2018-04-23 19:33 -0700
  Re: OT: PIC16 divide and/or multiply routines Terry Newton <nbill@bellsouth.net> - 2018-04-24 05:12 +0000
  Re: OT: PIC16 divide and/or multiply routines Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2018-04-24 09:26 +0100
    Re: OT: PIC16 divide and/or multiply routines John S <Sophi.2@invalid.org> - 2018-04-24 18:39 -0500
      Re: OT: PIC16 divide and/or multiply routines Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2018-04-25 08:37 +0100
        Re: OT: PIC16 divide and/or multiply routines "Tim Williams" <tiwill@seventransistorlabs.com> - 2018-04-25 03:25 -0500
          Re: OT: PIC16 divide and/or multiply routines Clifford Heath <no.spam@please.net> - 2018-04-25 19:57 +1000
        Re: OT: PIC16 divide and/or multiply routines Jasen Betts <jasen@xnet.co.nz> - 2018-04-26 07:24 +0000
          Re: OT: PIC16 divide and/or multiply routines David Brown <david.brown@hesbynett.no> - 2018-05-04 15:40 +0200
  Re: OT: PIC16 divide and/or multiply routines Spehro Pefhany <speffSNIP@interlogDOTyou.knowwhat> - 2018-04-24 08:51 -0400
    Re: OT: PIC16 divide and/or multiply routines upsidedown@downunder.com - 2018-04-24 22:38 +0300
      Re: OT: PIC16 divide and/or multiply routines gnuarm.deletethisbit@gmail.com - 2018-04-25 11:15 -0700
        Re: OT: PIC16 divide and/or multiply routines Clifford Heath <no.spam@please.net> - 2018-04-26 09:35 +1000
    Re: OT: PIC16 divide and/or multiply routines Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2018-04-25 08:38 +0100
      Re: OT: PIC16 divide and/or multiply routines gnuarm.deletethisbit@gmail.com - 2018-04-25 11:18 -0700
        Re: OT: PIC16 divide and/or multiply routines Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2018-04-26 08:56 +0100
    Re: OT: PIC16 divide and/or multiply routines bitrex <user@example.net> - 2018-04-25 11:56 -0400

csiph-web