Thread: [Flashforth-devel] Git(?), v5.0, and long division
Brought to you by:
oh2aun
From: craig b. <dab...@ya...> - 2014-03-05 11:56:28
|
Doing my first serious application project in FF3.8-Pic18 and having a blast with it, but you've gotten my curiosity up... 1) Is there a tutorial or walk-through for using Git? From what I can seee in SourceForge, it looks like a hash of sort-of-DIFF files for multiple projects and I've got no clue where to start with it. Things sound like v5.0 is coming along nicely and it might be nice to take a look at it. 2) Is there a word for doing 32bit by 32bit division and am I just missing it? Pouring over the docs and a quick scan of the source has only turned up a few variants of 32bit by 16bit which I've been able to work around up to this point. I thought it might be more elegant to calculate SPBRG load values on the fly instead of building a lookup for each chip clockrate/baudrate. Then I tried to divide 16000000 by 921600 and said "Oh BUGS!"... Will I need to build this one myself? (or just pre-factor the living bejeezes out of this problem, too?) Just curious, craig bair ...averaging may or may not help clarify data. If Bill Gates walks into a bar, the average patron becomes a millionaire... |
From: Thomas B. <bus...@gm...> - 2014-03-05 12:09:40
|
Hallo Craig, to No 1: maybe Sourcetree is a good tool for you. http://www.sourcetreeapp.com/ Greetz Thomas 2014-03-05 12:53 GMT+01:00 craig bair <dab...@ya...>: > Doing my first serious application project in FF3.8-Pic18 and having a > blast with it, but you've gotten my curiosity up... > > 1) Is there a tutorial or walk-through for using Git? From what I can > seee in SourceForge, it looks like a hash of sort-of-DIFF files for > multiple projects and I've got no clue where to start with it. Things > sound like v5.0 is coming along nicely and it might be nice to take a look > at it. > > |
From: Mikael N. <mik...@pp...> - 2014-03-05 16:25:13
|
Hi Craig, Here is in general about git http://git-scm.com/ http://git-scm.com/book/en/Getting-Started-About-Version-Control http://git-scm.com/downloads And here about git at sourceforge https://sourceforge.net/p/forge/documentation/Git/ Here you can find uq/mod https://sourceforge.net/p/flashforth/code/ci/master/tree/PIC18/forth/qmath.txt \ Divide a 64 bit unsigned number with a 32 bit unsigned number \ The result is a 32 bit remainder and 32 bit quotient uq/mod ( qu du -- du-rem du-quot ) https://sourceforge.net/p/flashforth/code/ci/master/tree/PIC18/forth/qmath.txt But instead of loading uq/mod I would prefactor and scale (divide Fcy and the UART rates by 100) and use the 32/16 bit words. You don't need 32 bit accuracy for the UART rates. BR Mike On 03/05/2014 01:53 PM, craig bair wrote: > Doing my first serious application project in FF3.8-Pic18 and having a blast with it, but you've gotten my curiosity up... > > 1) Is there a tutorial or walk-through for using Git? From what I can seee in SourceForge, it looks like a hash of sort-of-DIFF files for multiple projects and I've got no clue where to start with it. Things sound like v5.0 is coming along nicely and it might be nice to take a look at it. > > > 2) Is there a word for doing 32bit by 32bit division and am I just missing it? Pouring over the docs and a quick scan of the source has only turned up a few variants of 32bit by 16bit which I've been able to work around up to this point. I thought it might be more elegant to calculate SPBRG load values on the fly instead of building a lookup for each chip clockrate/baudrate. Then I tried to divide 16000000 by 921600 and said "Oh BUGS!"... Will I need to build this one myself? (or just pre-factor the living bejeezes out of this problem, too?) > > > Just curious, > craig bair > > > ...averaging may or may not help clarify data. > If Bill Gates walks into a bar, > the average patron becomes a millionaire... > > ------------------------------------------------------------------------------ > Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. > With Perforce, you get hassle-free workflows. Merge that actually works. > Faster operations. Version large binaries. Built-in WAN optimization and the > freedom to use Git, Perforce or both. Make the move to Perforce. > http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > |
From: Mikael N. <mik...@pp...> - 2014-03-05 18:58:51
|
Craig, Here is my take on calculating the spbrg value. It takes the CPU clock from Fcy and the baudrate and baudgenerator prescaler (16 or 64) is given as input. Not difficult at all. Just normal 16-bit Forth integer scaling stuff. $ffaf constant spbrg spbrg c@ . 18 ok<#,ram> : >spbrg ( double-baud brg-prescaler -- n ) >r #100 um/mod nip >r Fcy #40 um* r> um/mod nip r> / 1- ; 38400. 16 >spbrg . 18 ok<#,ram> |