> Public encryption requires plenty of code. I am > talking about blowfish,PGP and etc. So the normal PIC > 16 don cut it. You will have to use dsPIC or PIC24 > that is 16-bit. But the problem is that the byte > manipulation is quite intense. Therefore the hex > output would be big. I think sometimes you can make some hardware assistance for those manipulations - like the DES bit scrambling is just wiring the bits from here to there. But returning to the original context Olin has right that most of the times don't need large precision floating point, I would say a fixed point arithmetic is just enough for most tasks. Tamas On 25/08/06, John Chung wrote: > > Public encryption requires plenty of code. I am > talking about blowfish,PGP and etc. So the normal PIC > 16 don cut it. You will have to use dsPIC or PIC24 > that is 16-bit. But the problem is that the byte > manipulation is quite intense. Therefore the hex > output would be big. > > John > > --- Tamas Rudnai wrote: > > > I think few people here would like to do other > > things than claculating PWM > > stuff. I am not sure but for example for a public > > key cryptography they > > probably need higher accuracy. But for those > > probably is better to use > > co-processor? Is there any good math processor for > > this purpose? > > > > Tamas > > > > > > On 24/08/06, Olin Lathrop > > wrote: > > > > > > Bob Axtell wrote: > > > > I prefer MASM, too, but this job needs floating > > point, so I need a C > > > > compiler with a > > > > decent math unit. Its too difficult to fiddle > > with floating point MASM. > > > > > > Huh? I assume you really mean MPASM? I've used > > floating point a few > > > times > > > with MPASM and it's no big deal if the interface > > to the floating point > > > routines is done right. My floating point > > routines are integrated with my > > > "general register" model I use anyway. REG0-REG3 > > are defined as a single > > > 32 > > > bit register REGA, REG4-REG7 as REGB, etc. The > > wide registers are used by > > > various wide math routines, including my floating > > point routines. > > > Performing wide math on the wide registers is just > > calling the appropriate > > > routines. For example the source lines > > > > > > movlw 16 > > > movwf reg8 ;pass number of fraction > > bits > > > gcall fp24flt ;16.16 fixed point to > > floating point > > > gcall fp24mul ;multiply by REGB > > > > > > Convert the 16.16 fixed point number in REGA to 24 > > bit floating point in > > > the > > > low 3 bytes of REGA, then multiply that by the 24 > > bit floating point value > > > in REGB and write the result back to REGA. > > > > > > Another advantage of doing it this way is that you > > aren't stuck with IEEE > > > 32 > > > bit floating point. Compiler writers are often > > hung up on standards > > > complience at the expense of doing what it more > > useful in a small embedded > > > system. If you're measuring values with a 10 bit > > A/D and will ultimately > > > produce a 8 bit PWM output, 16 bits of mantissa is > > plenty for intermediate > > > calculations. Very very few real world control > > systems need more than 16 > > > bit accuracy for any calculations, nor all the > > fancy exception handling > > > built into the IEEE standard that compilers waste > > a lot of cycles and > > > space > > > on. You're not going to output 10**35 volts. > > Something else is already > > > wrong and the result of the calculation most > > likely irrelevant if such a > > > value ever comes out. > > > > > > I don't give out the floating point routines with > > the PIC development > > > environment that is available from the web site. > > In your case I'd be > > > happy > > > to let you use them for free, although you > > probably have to buy into using > > > the whole development environment for the FP > > routines to be > > > useful. Contact > > > me privately if you want them. > > > > > > > > > > > > ****************************************************************** > > > Embed Inc, Littleton Massachusetts, (978) > > 742-9014. #1 PIC > > > consultant in 2004 program year. > > http://www.embedinc.com/products > > > -- > > > http://www.piclist.com PIC/SX FAQ & list archive > > > View/change your membership options at > > > http://mailman.mit.edu/mailman/listinfo/piclist > > > > > > > > > > > -- > > unPIC -- The PIC Disassembler > > http://unpic.sourceforge.net > > -- > > http://www.piclist.com PIC/SX FAQ & list archive > > View/change your membership options at > > http://mailman.mit.edu/mailman/listinfo/piclist > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- unPIC -- The PIC Disassembler http://unpic.sourceforge.net -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist