flashforth-devel Mailing List for FlashForth: for PIC and Atmega (Page 28)
Brought to you by:
oh2aun
You can subscribe to this list here.
2011 |
Jan
|
Feb
(22) |
Mar
(3) |
Apr
(4) |
May
(6) |
Jun
(8) |
Jul
|
Aug
(6) |
Sep
|
Oct
(20) |
Nov
(9) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2012 |
Jan
(4) |
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(5) |
Oct
(14) |
Nov
(1) |
Dec
|
2013 |
Jan
(4) |
Feb
(5) |
Mar
(4) |
Apr
(2) |
May
|
Jun
(29) |
Jul
(7) |
Aug
|
Sep
(20) |
Oct
(9) |
Nov
(2) |
Dec
(7) |
2014 |
Jan
|
Feb
(23) |
Mar
(113) |
Apr
(25) |
May
(31) |
Jun
(9) |
Jul
(47) |
Aug
(15) |
Sep
(1) |
Oct
(4) |
Nov
(8) |
Dec
(3) |
2015 |
Jan
(21) |
Feb
(1) |
Mar
(18) |
Apr
(16) |
May
(100) |
Jun
(33) |
Jul
|
Aug
(10) |
Sep
(8) |
Oct
(7) |
Nov
(5) |
Dec
|
2016 |
Jan
(12) |
Feb
(9) |
Mar
|
Apr
(7) |
May
(5) |
Jun
(9) |
Jul
(1) |
Aug
(2) |
Sep
(17) |
Oct
(3) |
Nov
|
Dec
|
2017 |
Jan
(6) |
Feb
(12) |
Mar
(9) |
Apr
(3) |
May
(7) |
Jun
|
Jul
(12) |
Aug
|
Sep
(13) |
Oct
|
Nov
|
Dec
(10) |
2018 |
Jan
(1) |
Feb
|
Mar
(7) |
Apr
(4) |
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(21) |
Oct
(3) |
Nov
|
Dec
|
2019 |
Jan
(5) |
Feb
(4) |
Mar
|
Apr
|
May
(3) |
Jun
(11) |
Jul
(4) |
Aug
(6) |
Sep
(3) |
Oct
|
Nov
(9) |
Dec
(7) |
2020 |
Jan
(2) |
Feb
(3) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
(4) |
Dec
|
2021 |
Jan
|
Feb
|
Mar
(8) |
Apr
(40) |
May
(12) |
Jun
|
Jul
|
Aug
(3) |
Sep
(3) |
Oct
(4) |
Nov
(10) |
Dec
(4) |
2022 |
Jan
(29) |
Feb
(7) |
Mar
(10) |
Apr
|
May
(3) |
Jun
(3) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(6) |
2023 |
Jan
(8) |
Feb
|
Mar
(5) |
Apr
(9) |
May
(6) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
(9) |
Aug
(7) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Mikael N. <mik...@pp...> - 2014-07-23 11:41:17
|
<div style="font-size:10pt;"><p style="margin-top:0;margin-bottom:0;">You need a ICSP device programmer.</p><p style="margin-top:0;margin-bottom:0;"> </p><div><signature_tag><p style="margin-top:0;margin-bottom:0;">Mike</p><p style="margin-top:0;margin-bottom:0;">Sent from my LG Mobile</p></signature_tag></div><p id="last_enter" style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;">------ Original message------</p> <p style="margin-top:0;margin-bottom:0;"><b>From: </b>Rob<rsc...@op...></p><p style="margin-top:0;margin-bottom:0;"><b>Date: </b>Tue, 22/07/2014 23:29</p><p style="margin-top:0;margin-bottom:0;"><b>To: </b>fla...@li...;</p><p style="margin-top:0;margin-bottom:0;"><b>Subject:</b>[Flashforth-devel] FF5.0 on Arduino Uno R3</p><p style="margin-top:0;margin-bottom:0;"> </p><pre>Hi, I'm getting a verification error each time I upload ff5.0 hex file to Arduino Uno R3. The arduino accepts files created with Arduino's IDE. I assembled the ff5 asm file with Atmel Studio 6.2 successfully but got verification error on first byte when trying to upload. Also tried a hex uploaded called Xloader and also got a verification error. Rob Scholten ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds _______________________________________________ Flashforth-devel mailing list Fla...@li... https://lists.sourceforge.net/lists/listinfo/flashforth-devel </pre></div> |
From: Rob <rsc...@op...> - 2014-07-22 20:29:30
|
Hi, I'm getting a verification error each time I upload ff5.0 hex file to Arduino Uno R3. The arduino accepts files created with Arduino's IDE. I assembled the ff5 asm file with Atmel Studio 6.2 successfully but got verification error on first byte when trying to upload. Also tried a hex uploaded called Xloader and also got a verification error. Rob Scholten |
From: Thomas B. <bus...@gm...> - 2014-07-22 05:52:42
|
Dear Mikael, ok I see its in the p18f2525-2620-4525-4620.cfg. Its any possibility to read/change configurationsbit within FF? Because its situated on memoryposition 300005h. Greetings Thomas 2014-07-22 7:12 GMT+02:00 Mikael Nordman <mik...@pp...>: > There is a device configuration bit, CCP2MX, that determines if > RC1 or RB3 is used for the CCP2 module. > > Mike > > > > ------------------------------------------------------------------------------ > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > -- www.aloedb.org - database for aloes |
From: Mikael N. <mik...@pp...> - 2014-07-22 05:13:04
|
There is a device configuration bit, CCP2MX, that determines if RC1 or RB3 is used for the CCP2 module. Mike |
From: Thomas B. <bus...@gm...> - 2014-07-21 21:21:54
|
---------- Forwarded message ---------- From: Thomas Buschhardt <bus...@gm...> Date: 2014-07-21 23:21 GMT+02:00 Subject: Re: [Flashforth-devel] PWM at PIC18F2620 To: Mikael Nordman <mik...@pp...> Hallo, thats a correct failure :-) But after changing the value to the correct RB3, nothing happens. I tested also with 100% dutycycle but no signal came from this pin. I use also the values of this calculator: http://www.micro-examples.com/public/microex-navig/doc/097-pwm-calculator.html, but no luck. Thanks Thomas 2014-07-21 22:53 GMT+02:00 Mikael Nordman <mik...@pp...>: > Are sure you are using rb3 ? > > > > Your code is making rb2 an output. > > > > Mike > > Sent from my LG Mobile > > > > > > ------ Original message------ > > *From: *Thomas Buschhardt > > *Date: *Mon, 21/07/2014 19:53 > > *To: *flashforth-devel; > > *Subject:*[Flashforth-devel] PWM at PIC18F2620 > > > Hallo FFFans, > > I try to run PWM on a PIC18F2620 with no success (I dont see any spike in > the logic analyzer). Here are my parameters: > > Tosc 8 MHz > Periode: 36 KHz > Duty Cycle: 25% > Output is RB3/CCP2 Pin24 > Pre- Postscaler: 1 > > And here my Programm: > > -pwm > marker -pwm > $ff81 constant portb > $ff93 constant trisb > $ffba constant ccp2con > $ffcb constant pr2 > $ffbb constant ccpr2l > $ffcc constant tmr2 > $ffca constant t2con > > : init > \ Set the PWM period by writing to the PR2 register. > %00110110 pr2 c! \ #54 Periode: 0,0000275 s / Prescaler: 1 / Tosc: 8MHz > \ Set PWM dutycycle to the CCPR2L register and CCP2CON<5:4> bits > \ dutycyle: 25% = #56 (10bit) = %0000 1110 00 > %00001110 ccpr2l c! > %00110000 ccp2con mclr > \ Make the CCP2 pin an output by clearing the appropriate TRIS bit. > \ RB3/CCP2 output > %00000100 trisb mclr > \ Set the TMR2 prescale value, then enable Timer2 by writing to T2CON. > 0 tmr2 c! \ reset tmr2 > %00000100 t2con c! \ prescale 1, timer2 is on > \ Configure the CCPx module for PWM operation. > %00001100 ccp2con c! > ; > > What I missed ? > > Thank you for looking. > Thomas > -- > We have a IRC-Channel #flashforth on freenode.org. > WebIRC-Client is here > <http://webchat.freenode.net?randomnick=1&channels=%23flashforth&uio=d4> > > > ------------------------------------------------------------------------------ > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > > -- www.aloedb.org - database for aloes -- www.aloedb.org - database for aloes |
From: Mikael N. <mik...@pp...> - 2014-07-21 20:53:32
|
<div style="font-size:10pt;"><p style="margin-top:0;margin-bottom:0;">Are sure you are using rb3 ?</p><p style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;">Your code is making rb2 an output.</p><p style="margin-top:0;margin-bottom:0;"> </p><div><signature_tag><p style="margin-top:0;margin-bottom:0;">Mike</p><p style="margin-top:0;margin-bottom:0;">Sent from my LG Mobile</p></signature_tag></div><p id="last_enter" style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;">------ Original message------</p> <p style="margin-top:0;margin-bottom:0;"><b>From: </b>Thomas Buschhardt<bus...@gm...></p><p style="margin-top:0;margin-bottom:0;"><b>Date: </b>Mon, 21/07/2014 19:53</p><p style="margin-top:0;margin-bottom:0;"><b>To: </b>flashforth-devel;</p><p style="margin-top:0;margin-bottom:0;"><b>Subject:</b>[Flashforth-devel] PWM at PIC18F2620</p><p style="margin-top:0;margin-bottom:0;"> </p><div dir="ltr">Hallo FFFans,<div><br></div><div>I try to run PWM on a PIC18F2620 with no success (I dont see any spike in the logic analyzer). Here are my parameters:</div><div><br></div><div>Tosc 8 MHz</div><div>Periode: 36 KHz</div> <div>Duty Cycle: 25%</div><div>Output is RB3/CCP2 Pin24</div><div>Pre- Postscaler: 1</div><div><br></div><div>And here my Programm:</div><div><br></div><div><div><font face="courier new, monospace">-pwm</font></div><div><font face="courier new, monospace">marker -pwm</font></div> <div><font face="courier new, monospace">$ff81 constant portb</font></div><div><font face="courier new, monospace">$ff93 constant trisb</font></div><div><font face="courier new, monospace">$ffba constant ccp2con</font></div> <div><font face="courier new, monospace">$ffcb constant pr2</font></div><div><font face="courier new, monospace">$ffbb constant ccpr2l</font></div><div><font face="courier new, monospace">$ffcc constant tmr2</font></div><div> <font face="courier new, monospace">$ffca constant t2con</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">: init</font></div><div><font face="courier new, monospace">\ Set the PWM period by writing to the PR2 register.</font></div> <div><font face="courier new, monospace">%00110110 pr2 c! \ #54 Periode: 0,0000275 s / Prescaler: 1 / Tosc: 8MHz</font></div><div><font face="courier new, monospace">\ Set PWM dutycycle to the CCPR2L register and CCP2CON<5:4> bits</font></div> <div><font face="courier new, monospace">\ dutycyle: 25% = #56 (10bit) = %0000 1110 00</font></div><div><font face="courier new, monospace">%00001110 ccpr2l c!</font></div><div><font face="courier new, monospace">%00110000 ccp2con mclr</font></div> <div><font face="courier new, monospace">\ Make the CCP2 pin an output by clearing the appropriate TRIS bit.</font></div><div><font face="courier new, monospace">\ RB3/CCP2 output</font></div><div><font face="courier new, monospace">%00000100 trisb mclr</font></div> <div><font face="courier new, monospace">\ Set the TMR2 prescale value, then enable Timer2 by writing to T2CON.</font></div><div><font face="courier new, monospace">0 tmr2 c! \ reset tmr2</font></div><div><font face="courier new, monospace">%00000100 t2con c! \ prescale 1, timer2 is on</font></div> <div><font face="courier new, monospace">\ Configure the CCPx module for PWM operation.</font></div><div><span style="font-family:'courier new',monospace">%00001100 ccp2con c!</span><br></div><div><font face="courier new, monospace">;</font></div> </div><div><br></div><div>What I missed ?</div><div><br></div><div>Thank you for looking.</div><div>Thomas</div><div>-- <br><div>We have a IRC-Channel #flashforth on <a href="http://freenode.org">freenode.org</a>.</div><div> WebIRC-Client is <a href="http://webchat.freenode.net?randomnick=1&channels=%23flashforth&uio=d4">here</a></div> </div></div> </div> |
From: Mikael N. <mik...@pp...> - 2014-07-21 20:37:18
|
<div style="font-size:10pt;"><p style="margin-top:0;margin-bottom:0;">It is not the watchdog.</p><p style="margin-top:0;margin-bottom:0;">It is the idle mode. BUSY disables the idle mode, or you can disable it in the config file.</p><p style="margin-top:0;margin-bottom:0;"> </p><div><signature_tag><p style="margin-top:0;margin-bottom:0;">Mike</p><p style="margin-top:0;margin-bottom:0;">Sent from my LG Mobile</p></signature_tag></div><p id="last_enter" style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;">------ Original message------</p> <p style="margin-top:0;margin-bottom:0;"><b>From: </b>Thomas Buschhardt<bus...@gm...></p><p style="margin-top:0;margin-bottom:0;"><b>Date: </b>Mon, 21/07/2014 20:14</p><p style="margin-top:0;margin-bottom:0;"><b>To: </b>flashforth-devel;</p><p style="margin-top:0;margin-bottom:0;"><b>Subject:</b>Re: [Flashforth-devel] Assembler Loops</p><p style="margin-top:0;margin-bottom:0;"> </p><div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">Dear Mikael,</span><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">thank you very much for helping. I test the program and it runs good, but every 1 ms I get a error (like a delay). Please see at attachment.</div> <div style="font-family:arial,sans-serif;font-size:13px">Is that a watchdog?</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Greetings Thomas</div> <div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">The files are here (Logic/Screenshot) -> </div><a href="http://wikisend.com/download/584094/pwm_old.logicdata"><div style="font-family:arial,sans-serif;font-size:13px"> http://wikisend.com/download/584094/pwm_old.logicdata</div></a><div style="font-family:arial,sans-serif;font-size:13px"><span style="font-size:10pt;"><a href="http://wikisend.com/download/785422/Bildschirmfoto 2014-07-21 um 19.03.36.png" style="font-size:small">http://wikisend.com/download/785422/Bildschirmfoto 2014-07-21 um 19.03.36.png</a></span><br> </div><div style="font-family:arial,sans-serif;font-size:13px"><br></div> <div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-11 16:46 GMT+02:00 Mikael Nordman <span dir="ltr"><<a href="mailto:mikael..no...@pp..." target="_blank">mik...@pp...</a>></span>:<br> <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Here is example for bitbanging 16 bits on a spi interface.<br> <div>It uses the FSR1L(=Tp) and FSR1H(=Tp 1 +)<br> temporary registers which are always free to be used in<br> any assembly word.<br> <br> Note that FSR1H is only 4 bits wide. FSR1L is 8 bits wide.<br> <br> </div>Srw and Sminus words are accessing the parameter stack indirectly.<br> <br> There are also other registers that can safely be used as variables in<br> <div>assembler words.<br> FSR2L FSR2H TBLPTRL TBLPTRH TABLAT PRODL PRODH<br> </div>The registers are located in access ram so no bank bits need to be set.<br> <div><div><br> : spi! ( u -- )<br> [ #2 movlw, ]<br> [ Tp a, movwf, ]<br> [ begin, ]<br> [ #8 movlw, ]<br> [ Tp 1+ a, movwf, ]<br> [ begin, ]<br> [ Srw f, a, rlcf, ]<br> [ cc, if, lata sdata a, bsf, else, lata sdata a, bcf, then, ]<br> [ lata sclk a, btg, ]<br> [ lata sclk a, btg, ]<br> [ Tp 1+ f, a, decf, ]<br> [ z, until, ]<br> [ Sminus w, a, movf, ]<br> [ Tp f, a, decf, ]<br> [ z, until, ]<br> ;<br> <br> Mike<br> <br> <br> ------------------------------------------------------------------------------<br> Open source business process management suite built on Java and Eclipse<br> Turn processes into business applications with Bonita BPM Community Edition<br> Quickly connect people, data, and systems into organized workflows<br> Winner of BOSSIE, CODIE, OW2 and Gartner awards<br> <a href="http://p.sf.net/sfu/Bonitasoft" target="_blank">http://p.sf.net/sfu/Bonitasoft</a><br> _______________________________________________<br> Flashforth-devel mailing list<br> <a href="mailto:Fla...@li..." target="_blank">Fla...@li...</a><br> <a href="https://lists.sourceforge.net/lists/listinfo/flashforth-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/flashforth-devel</a><br> </div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><a href="http://www.aloedb.org" target="_blank">www.aloedb.org</a> - database for aloes</div> </div></div> </div> |
From: Thomas B. <bus...@gm...> - 2014-07-21 17:14:13
|
Dear Mikael, thank you very much for helping. I test the program and it runs good, but every 1 ms I get a error (like a delay). Please see at attachment. Is that a watchdog? Greetings Thomas The files are here (Logic/Screenshot) -> http://wikisend.com/download/584094/pwm_old.logicdata http://wikisend.com/download/785422/Bildschirmfoto 2014-07-21 um 19.03.36.png 2014-07-11 16:46 GMT+02:00 Mikael Nordman <mik...@pp...>: > Here is example for bitbanging 16 bits on a spi interface. > It uses the FSR1L(=Tp) and FSR1H(=Tp 1 +) > temporary registers which are always free to be used in > any assembly word. > > Note that FSR1H is only 4 bits wide. FSR1L is 8 bits wide. > > Srw and Sminus words are accessing the parameter stack indirectly. > > There are also other registers that can safely be used as variables in > assembler words. > FSR2L FSR2H TBLPTRL TBLPTRH TABLAT PRODL PRODH > The registers are located in access ram so no bank bits need to be set. > > : spi! ( u -- ) > [ #2 movlw, ] > [ Tp a, movwf, ] > [ begin, ] > [ #8 movlw, ] > [ Tp 1+ a, movwf, ] > [ begin, ] > [ Srw f, a, rlcf, ] > [ cc, if, lata sdata a, bsf, else, lata sdata a, bcf, then, ] > [ lata sclk a, btg, ] > [ lata sclk a, btg, ] > [ Tp 1+ f, a, decf, ] > [ z, until, ] > [ Sminus w, a, movf, ] > [ Tp f, a, decf, ] > [ z, until, ] > ; > > Mike > > > > ------------------------------------------------------------------------------ > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > -- www.aloedb.org - database for aloes |
From: Thomas B. <bus...@gm...> - 2014-07-21 16:52:56
|
Hallo FFFans, I try to run PWM on a PIC18F2620 with no success (I dont see any spike in the logic analyzer). Here are my parameters: Tosc 8 MHz Periode: 36 KHz Duty Cycle: 25% Output is RB3/CCP2 Pin24 Pre- Postscaler: 1 And here my Programm: -pwm marker -pwm $ff81 constant portb $ff93 constant trisb $ffba constant ccp2con $ffcb constant pr2 $ffbb constant ccpr2l $ffcc constant tmr2 $ffca constant t2con : init \ Set the PWM period by writing to the PR2 register. %00110110 pr2 c! \ #54 Periode: 0,0000275 s / Prescaler: 1 / Tosc: 8MHz \ Set PWM dutycycle to the CCPR2L register and CCP2CON<5:4> bits \ dutycyle: 25% = #56 (10bit) = %0000 1110 00 %00001110 ccpr2l c! %00110000 ccp2con mclr \ Make the CCP2 pin an output by clearing the appropriate TRIS bit. \ RB3/CCP2 output %00000100 trisb mclr \ Set the TMR2 prescale value, then enable Timer2 by writing to T2CON. 0 tmr2 c! \ reset tmr2 %00000100 t2con c! \ prescale 1, timer2 is on \ Configure the CCPx module for PWM operation. %00001100 ccp2con c! ; What I missed ? Thank you for looking. Thomas -- We have a IRC-Channel #flashforth on freenode.org. WebIRC-Client is here <http://webchat.freenode.net?randomnick=1&channels=%23flashforth&uio=d4> |
From: Mikael N. <mik...@pp...> - 2014-07-21 14:00:45
|
<div style="font-size:10pt;"><p style="margin-top:0;margin-bottom:0;">The processing delay comes from the flash write delay which stops the processor. Flash write can happen also at other occasions than ;</p><p style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;">A python shell similar to amforths would solve flow control issues and give additonal funtionality like command history, line edit and include files</p><p style="margin-top:0;margin-bottom:0;"> </p><div><signature_tag><p style="margin-top:0;margin-bottom:0;">Mike</p><p style="margin-top:0;margin-bottom:0;">Sent from my LG Mobile</p></signature_tag></div><p id="last_enter" style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;">------ Original message------</p> <p style="margin-top:0;margin-bottom:0;"><b>From: </b>pito<pi...@vo...></p><p style="margin-top:0;margin-bottom:0;"><b>Date: </b>Sun, 20/07/2014 21:00</p><p style="margin-top:0;margin-bottom:0;"><b>To: </b>Herman Attila;fla...@li...;Mikael Nordman;</p><p style="margin-top:0;margin-bottom:0;"><b>Subject:</b>Re: [Flashforth-devel] Xon/Xoff how to</p><p style="margin-top:0;margin-bottom:0;"> </p><pre>After some experiments it seems to me the issue is with the time the compiler needs to process a new word. With interchar delay set to 0 and line delay ie. 300ms it works fine. Maybe an "uploader" which will send the chars full speed and then wait some time after sending the closing ";" would solve all issues... P. ______________________________________________________________ > Od: Herman Attila <exp...@vn...> > Komu: <fla...@li...> > Datum: 20.07.2014 13:45 > Předmět: Re: [Flashforth-devel] Xon/Xoff how to > >Hello Pito, > >Usually I use 38400 bps, but somtimes needed interchar and endline >delay for reliable upload, depending on speed and actual load of PC. >I don't know the CA-42, but e.g. the ATEN UC232 seems me unusable with >XON/XOFF. I use FÍT232RL, FT230XQ chips of FTDI. >However the most reliable solution the HW flow control, especially if >you want to use hi bitrate. > >BR >Attila Herman > >------------------------------------------------------------------------------ >Want fast and easy access to all the code in your enterprise? Index and >search up to 200,000 lines of code with a free copy of Black Duck >Code Sight - the same software that powers the world's largest code >search on Ohloh, the Black Duck Open Hub! Try it now. >http://p.sf.net/sfu/bds >_______________________________________________ >Flashforth-devel mailing list >Fla...@li... >https://lists.sourceforge.net/lists/listinfo/flashforth-devel > </pre></div> |
From: pito <pi...@vo...> - 2014-07-20 18:00:22
|
After some experiments it seems to me the issue is with the time the compiler needs to process a new word. With interchar delay set to 0 and line delay ie. 300ms it works fine. Maybe an "uploader" which will send the chars full speed and then wait some time after sending the closing ";" would solve all issues... P. ______________________________________________________________ > Od: Herman Attila <exp...@vn...> > Komu: <fla...@li...> > Datum: 20.07.2014 13:45 > Předmět: Re: [Flashforth-devel] Xon/Xoff how to > >Hello Pito, > >Usually I use 38400 bps, but somtimes needed interchar and endline >delay for reliable upload, depending on speed and actual load of PC. >I don't know the CA-42, but e.g. the ATEN UC232 seems me unusable with >XON/XOFF. I use FÍT232RL, FT230XQ chips of FTDI. >However the most reliable solution the HW flow control, especially if >you want to use hi bitrate. > >BR >Attila Herman > >------------------------------------------------------------------------------ >Want fast and easy access to all the code in your enterprise? Index and >search up to 200,000 lines of code with a free copy of Black Duck >Code Sight - the same software that powers the world's largest code >search on Ohloh, the Black Duck Open Hub! Try it now. >http://p.sf.net/sfu/bds >_______________________________________________ >Flashforth-devel mailing list >Fla...@li... >https://lists.sourceforge.net/lists/listinfo/flashforth-devel > |
From: Herman A. <exp...@vn...> - 2014-07-20 11:45:30
|
Hello Pito, Usually I use 38400 bps, but somtimes needed interchar and endline delay for reliable upload, depending on speed and actual load of PC. I don't know the CA-42, but e.g. the ATEN UC232 seems me unusable with XON/XOFF. I use FÍT232RL, FT230XQ chips of FTDI. However the most reliable solution the HW flow control, especially if you want to use hi bitrate. BR Attila Herman |
From: Mikael N. <mik...@pp...> - 2014-07-20 11:35:30
|
<div style="font-size:10pt;"><div style="font-size:10pt;"><p style="margin-top:0;margin-bottom:0;">It is a problem with too much latency in serial transmission, usually caused by too long queues in the UART or the USB bridge. Using lower bauds may decrease the buffer sizes, or not...</p><p style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;">Some USB bridges can handle xon xoff in good way and some not...</p><p style="margin-top:0;margin-bottom:0;">A USB bridge that supports rts cts can solve the problem.</p><p style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;">The same appli</p><p style="margin-top:0;margin-bottom:0;"> </p><div><signature_tag><p style="margin-top:0;margin-bottom:0;">Sent from my LG Mobile</p></signature_tag></div><p id="last_enter" style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;">------ Original message------</p> <p style="margin-top:0;margin-bottom:0;"><b>From: </b>pito<pi...@vo...></p><p style="margin-top:0;margin-bottom:0;"><b>Date: </b>Sun, 20/07/2014 12:26</p><p style="margin-top:0;margin-bottom:0;"><b>To: </b>flashforth-devel;</p><p style="margin-top:0;margin-bottom:0;"><b>Subject:</b>[Flashforth-devel] Xon/Xoff how to</p><p style="margin-top:0;margin-bottom:0;"> </p><pre>I've been using Xon/Xoff with FF50 and dspic33@40MHz and Teraterm @115k2, all done via CA-42 usb/serial. Rx buffer increased to 128bytes. The code uploaded works only when I set interchar delay to 1ms and endline delay to 100ms. When interchar set to 0, it uploads without showing errors but the code hangs. Is there any trick how to push the serial to use Xon/Xoff actually? Is that an issue of CA-42 and a like? P. ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds _______________________________________________ Flashforth-devel mailing list Fla...@li... https://lists.sourceforge.net/lists/listinfo/flashforth-devel </pre></div></div> |
From: pito <pi...@vo...> - 2014-07-20 09:26:25
|
I've been using Xon/Xoff with FF50 and dspic33@40MHz and Teraterm @115k2, all done via CA-42 usb/serial. Rx buffer increased to 128bytes. The code uploaded works only when I set interchar delay to 1ms and endline delay to 100ms. When interchar set to 0, it uploads without showing errors but the code hangs. Is there any trick how to push the serial to use Xon/Xoff actually? Is that an issue of CA-42 and a like? P. |
From: pito <pi...@vo...> - 2014-07-16 10:57:06
|
I cannot resist to add the others: 777 s>f 1000 s>f f/ fconstant arg \ = 0.777 ok<#,ram> arg fsin fs. 7.01144E-1 ok<#,ram> arg fcos fs. 7.13020E-1 ok<#,ram> arg ftan fs. 9.83343E-1 ok<#,ram> arg fsqrt fs. 8.81476E-1 ok<#,ram> arg fexp fs. 2.17494E0 ok<#,ram> arg flog fs. -2.52315E-1 ok<#,ram> arg arg fpow fs. 8.21972E-1 ok<#,ram> pure C functions called from FF: bsin 2.26716E3 CPU INSTRs per fsin ok<#,ram> bcos 3.03178E3 CPU INSTRs per fcos ok<#,ram> btan 2.90925E3 CPU INSTRs per ftan ok<#,ram> blog 2.53247E3 CPU INSTRs per flog ok<#,ram> bexp 3.04007E3 CPU INSTRs per fexp ok<#,ram> bsqrt 525.103E0 CPU INSTRs per fsqrt ok<#,ram> 7-9x faster than the same with 4 Cfloat primitves and forth.. ;) Very nice! Pito. ______________________________________________________________ > Od: "pito" <pi...@vo...> > Komu: Mikael Nordman <mik...@pp...>, "flashforth-devel" <fla...@li...> > Datum: 16.07.2014 11:51 > Předmět: Re: [Flashforth-devel] C stack - passing the params (pic24/33) > >And a final benchmark this week - the fsin fcos ftan fatan written in forth, and in forth but with 4 Cfloat primitives: > >forth: >bsin 315.614E3 CPU INSTRs per fsin ok<#,ram> >bcos 317.457E3 CPU INSTRs per fcos ok<#,ram> >btan 645.600E3 CPU INSTRs per ftan ok<#,ram> >batan 95.9004E3 CPU INSTRs per fatan ok<#,ram> > >Cfloat 4 primitives: >bsin 20.9120E3 CPU INSTRs per fsin ok<#,ram> >bcos 20.6356E3 CPU INSTRs per fcos ok<#,ram> >btan 42.2846E3 CPU INSTRs per ftan ok<#,ram> >batan 2.11884E3 CPU INSTRs per fatan ok<#,ram> > >15x faster for sin cos tan, 45x for atan (a simple algorithm only). >These trigo functions will be even much faster when called from C directly .. :) >Pito > >______________________________________________________________ >> Od: "pito" <pi...@vo...> >> Komu: Mikael Nordman <mik...@pp...>, "flashforth-devel" <fla...@li...> >> Datum: 16.07.2014 11:31 >> Předmět: Re: [Flashforth-devel] C stack - passing the params (pic24/33) >> >>4 float primitives added, now the benchmarks (empty loop not subtracted): >> >>Cfloats: >>be 35.0069E0 CPU INSTRs per empty loop ok<#,ram> >>b+ 279.134E0 CPU INSTRs per f+ ok<#,ram> >>b- 277.291E0 CPU INSTRs per f- ok<#,ram> >>b* 171.349E0 CPU INSTRs per f* ok<#,ram> >>b/ 435.743E0 CPU INSTRs per f/ ok<#,ram> >> >> >>forth: >>be 35.0069E0 CPU INSTRs per empty loop ok<#,ram> >>b+ 2.49101E3 CPU INSTRs per f+ ok<#,ram> >>b- 2.72317E3 CPU INSTRs per f- ok<#,ram> >>b* 26.6107E3 CPU INSTRs per f* ok<#,ram> >>b/ 13.2768E3 CPU INSTRs per f/ ok<#,ram> >> >>Interestingly the forth's version of f/ is faster than f*... :) >> >>From 11x to 190x speedup.. >> >>Nice! >> >>The next step is to add the another 30 floating point functions.. :) >> >>Pito >> >>______________________________________________________________ >>> Od: "pito" <pi...@vo...> >>> Komu: Mikael Nordman <mik...@pp...>, "flashforth-devel" <fla...@li...> >>> Datum: 16.07.2014 10:29 >>> Předmět: Re: [Flashforth-devel] C stack - passing the params (pic24/33) >>> >>>Ok, reordered: >>> >>>100000. d>f 7 s>f Cf/ ok<#,ram> 14043 18015 >>>f. 14285.7 ok<#,ram> >>> >>>1000000. d>f 7 s>f Cf/ fs. 1.42857E5 ok<#,ram> >>> >>>forth: >>>bench/ 13.2768E3 CPU INSTRs per f/ ok<#,ram> >>> >>>Cf/: >>>bench/ 435.743E0 CPU INSTRs per f/ ok<#,ram> >>> >>>13276 / 436 = 30x faster >>>Nice.. >>>Pito. >>> >>> >>>______________________________________________________________ >>>> Od: "pito" <pi...@vo...> >>>> Komu: Mikael Nordman <mik...@pp...>, "flashforth-devel" <fla...@li...> >>>> Datum: 16.07.2014 09:49 >>>> Předmět: Re: [Flashforth-devel] C stack - passing the params (pic24/33) >>>> >>>>It works basically, but the order of the operands and its words is weird, so I have to swap everything before calling Cfsub. >>>>So the order of the shorts passed needs to be rearranged.. >>>> >>>>"30000 - 10000" = >>>> >>>>10000 s>f swap 30000 s>f swap Cf- f. 20000.0 ok<#,ram> >>>> >>>>However, even with 2 addtional swaps I get following result for Cfsub: >>>> >>>>forth version: >>>>bench- 2.72317E3 CPU INSTRs per f- ok<#,ram> >>>> >>>>Cf- version: >>>>bench- 283.740E0 CPU INSTRs per f- ok<#,ram> >>>> >>>>So the C version of the f- is ~10x faster than the forth version. Nice... >>>> >>>>Pito >>>> >>>> >>>> >>>> >>>> >>>>______________________________________________________________ >>>>> Od: Mikael Nordman <mik...@pp...> >>>>> Komu: <pi...@vo...>, <fla...@li...> >>>>> Datum: 16.07.2014 08:53 >>>>> Předmět: Re: [Flashforth-devel] C stack - passing the params (pic24/33) >>>>> >>>>>Probably, but check the xc16 help section. I think it describes the parameter passing. >>>>> >>>>>Mike >>>>> >>>>>Sent from my LG Mobile >>>>> >>>>>------ Original message------ >>>>> >>>>>From: pito >>>>> >>>>>Date: Wed, 16/07/2014 02:52 >>>>> >>>>>To: flashforth-devel; >>>>> >>>>>Subject:[Flashforth-devel] C stack - passing the params (pic24/33) >>>>> >>>>>In the C example we pass a single 16bit short param: mov [W14], W0 .extern C4add call _C4add mov W0, [W14] So my current understanding is to pass 4 shorts (2 floats) would mean something like this: ( f1l f1h f2l f2h -- fl fh ) mov [W14--], W0 ; f2h mov [W14--], W1 ; f2l mov [W14--], W2 ; f1h mov [W14], W3 ; f1l .extern Cfadd call _Cfadd mov W0, [W14++] ; fl mov W1, [W14] ; fh Am I correct?? Thanks, P. ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds _______________________________________________ Flashforth-devel mailing list Fla...@li... https://lists.sourceforge.net/lists/listinfo/flashforth-devel >>>>> >>>> >>> >> > |
From: pito <pi...@vo...> - 2014-07-16 09:51:30
|
And a final benchmark this week - the fsin fcos ftan fatan written in forth, and in forth but with 4 Cfloat primitives: forth: bsin 315.614E3 CPU INSTRs per fsin ok<#,ram> bcos 317.457E3 CPU INSTRs per fcos ok<#,ram> btan 645.600E3 CPU INSTRs per ftan ok<#,ram> batan 95.9004E3 CPU INSTRs per fatan ok<#,ram> Cfloat 4 primitives: bsin 20.9120E3 CPU INSTRs per fsin ok<#,ram> bcos 20.6356E3 CPU INSTRs per fcos ok<#,ram> btan 42.2846E3 CPU INSTRs per ftan ok<#,ram> batan 2.11884E3 CPU INSTRs per fatan ok<#,ram> 15x faster for sin cos tan, 45x for atan (a simple algorithm only). These trigo functions will be even much faster when called from C directly .. :) Pito ______________________________________________________________ > Od: "pito" <pi...@vo...> > Komu: Mikael Nordman <mik...@pp...>, "flashforth-devel" <fla...@li...> > Datum: 16.07.2014 11:31 > Předmět: Re: [Flashforth-devel] C stack - passing the params (pic24/33) > >4 float primitives added, now the benchmarks (empty loop not subtracted): > >Cfloats: >be 35.0069E0 CPU INSTRs per empty loop ok<#,ram> >b+ 279.134E0 CPU INSTRs per f+ ok<#,ram> >b- 277.291E0 CPU INSTRs per f- ok<#,ram> >b* 171.349E0 CPU INSTRs per f* ok<#,ram> >b/ 435.743E0 CPU INSTRs per f/ ok<#,ram> > > >forth: >be 35.0069E0 CPU INSTRs per empty loop ok<#,ram> >b+ 2.49101E3 CPU INSTRs per f+ ok<#,ram> >b- 2.72317E3 CPU INSTRs per f- ok<#,ram> >b* 26.6107E3 CPU INSTRs per f* ok<#,ram> >b/ 13.2768E3 CPU INSTRs per f/ ok<#,ram> > >Interestingly the forth's version of f/ is faster than f*... :) > >From 11x to 190x speedup.. > >Nice! > >The next step is to add the another 30 floating point functions.. :) > >Pito > >______________________________________________________________ >> Od: "pito" <pi...@vo...> >> Komu: Mikael Nordman <mik...@pp...>, "flashforth-devel" <fla...@li...> >> Datum: 16.07.2014 10:29 >> Předmět: Re: [Flashforth-devel] C stack - passing the params (pic24/33) >> >>Ok, reordered: >> >>100000. d>f 7 s>f Cf/ ok<#,ram> 14043 18015 >>f. 14285.7 ok<#,ram> >> >>1000000. d>f 7 s>f Cf/ fs. 1.42857E5 ok<#,ram> >> >>forth: >>bench/ 13.2768E3 CPU INSTRs per f/ ok<#,ram> >> >>Cf/: >>bench/ 435.743E0 CPU INSTRs per f/ ok<#,ram> >> >>13276 / 436 = 30x faster >>Nice.. >>Pito. >> >> >>______________________________________________________________ >>> Od: "pito" <pi...@vo...> >>> Komu: Mikael Nordman <mik...@pp...>, "flashforth-devel" <fla...@li...> >>> Datum: 16.07.2014 09:49 >>> Předmět: Re: [Flashforth-devel] C stack - passing the params (pic24/33) >>> >>>It works basically, but the order of the operands and its words is weird, so I have to swap everything before calling Cfsub. >>>So the order of the shorts passed needs to be rearranged.. >>> >>>"30000 - 10000" = >>> >>>10000 s>f swap 30000 s>f swap Cf- f. 20000.0 ok<#,ram> >>> >>>However, even with 2 addtional swaps I get following result for Cfsub: >>> >>>forth version: >>>bench- 2.72317E3 CPU INSTRs per f- ok<#,ram> >>> >>>Cf- version: >>>bench- 283.740E0 CPU INSTRs per f- ok<#,ram> >>> >>>So the C version of the f- is ~10x faster than the forth version. Nice... >>> >>>Pito >>> >>> >>> >>> >>> >>>______________________________________________________________ >>>> Od: Mikael Nordman <mik...@pp...> >>>> Komu: <pi...@vo...>, <fla...@li...> >>>> Datum: 16.07.2014 08:53 >>>> Předmět: Re: [Flashforth-devel] C stack - passing the params (pic24/33) >>>> >>>>Probably, but check the xc16 help section. I think it describes the parameter passing. >>>> >>>>Mike >>>> >>>>Sent from my LG Mobile >>>> >>>>------ Original message------ >>>> >>>>From: pito >>>> >>>>Date: Wed, 16/07/2014 02:52 >>>> >>>>To: flashforth-devel; >>>> >>>>Subject:[Flashforth-devel] C stack - passing the params (pic24/33) >>>> >>>>In the C example we pass a single 16bit short param: mov [W14], W0 .extern C4add call _C4add mov W0, [W14] So my current understanding is to pass 4 shorts (2 floats) would mean something like this: ( f1l f1h f2l f2h -- fl fh ) mov [W14--], W0 ; f2h mov [W14--], W1 ; f2l mov [W14--], W2 ; f1h mov [W14], W3 ; f1l .extern Cfadd call _Cfadd mov W0, [W14++] ; fl mov W1, [W14] ; fh Am I correct?? Thanks, P. ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds _______________________________________________ Flashforth-devel mailing list Fla...@li... https://lists.sourceforge.net/lists/listinfo/flashforth-devel >>>> >>> >> > |
From: pito <pi...@vo...> - 2014-07-16 09:31:45
|
4 float primitives added, now the benchmarks (empty loop not subtracted): Cfloats: be 35.0069E0 CPU INSTRs per empty loop ok<#,ram> b+ 279.134E0 CPU INSTRs per f+ ok<#,ram> b- 277.291E0 CPU INSTRs per f- ok<#,ram> b* 171.349E0 CPU INSTRs per f* ok<#,ram> b/ 435.743E0 CPU INSTRs per f/ ok<#,ram> forth: be 35.0069E0 CPU INSTRs per empty loop ok<#,ram> b+ 2.49101E3 CPU INSTRs per f+ ok<#,ram> b- 2.72317E3 CPU INSTRs per f- ok<#,ram> b* 26.6107E3 CPU INSTRs per f* ok<#,ram> b/ 13.2768E3 CPU INSTRs per f/ ok<#,ram> Interestingly the forth's version of f/ is faster than f*... :) >From 11x to 190x speedup.. Nice! The next step is to add the another 30 floating point functions.. :) Pito ______________________________________________________________ > Od: "pito" <pi...@vo...> > Komu: Mikael Nordman <mik...@pp...>, "flashforth-devel" <fla...@li...> > Datum: 16.07.2014 10:29 > Předmět: Re: [Flashforth-devel] C stack - passing the params (pic24/33) > >Ok, reordered: > >100000. d>f 7 s>f Cf/ ok<#,ram> 14043 18015 >f. 14285.7 ok<#,ram> > >1000000. d>f 7 s>f Cf/ fs. 1.42857E5 ok<#,ram> > >forth: >bench/ 13.2768E3 CPU INSTRs per f/ ok<#,ram> > >Cf/: >bench/ 435.743E0 CPU INSTRs per f/ ok<#,ram> > >13276 / 436 = 30x faster >Nice.. >Pito. > > >______________________________________________________________ >> Od: "pito" <pi...@vo...> >> Komu: Mikael Nordman <mik...@pp...>, "flashforth-devel" <fla...@li...> >> Datum: 16.07.2014 09:49 >> Předmět: Re: [Flashforth-devel] C stack - passing the params (pic24/33) >> >>It works basically, but the order of the operands and its words is weird, so I have to swap everything before calling Cfsub. >>So the order of the shorts passed needs to be rearranged.. >> >>"30000 - 10000" = >> >>10000 s>f swap 30000 s>f swap Cf- f. 20000.0 ok<#,ram> >> >>However, even with 2 addtional swaps I get following result for Cfsub: >> >>forth version: >>bench- 2.72317E3 CPU INSTRs per f- ok<#,ram> >> >>Cf- version: >>bench- 283.740E0 CPU INSTRs per f- ok<#,ram> >> >>So the C version of the f- is ~10x faster than the forth version. Nice... >> >>Pito >> >> >> >> >> >>______________________________________________________________ >>> Od: Mikael Nordman <mik...@pp...> >>> Komu: <pi...@vo...>, <fla...@li...> >>> Datum: 16.07.2014 08:53 >>> Předmět: Re: [Flashforth-devel] C stack - passing the params (pic24/33) >>> >>>Probably, but check the xc16 help section. I think it describes the parameter passing. >>> >>>Mike >>> >>>Sent from my LG Mobile >>> >>>------ Original message------ >>> >>>From: pito >>> >>>Date: Wed, 16/07/2014 02:52 >>> >>>To: flashforth-devel; >>> >>>Subject:[Flashforth-devel] C stack - passing the params (pic24/33) >>> >>>In the C example we pass a single 16bit short param: mov [W14], W0 .extern C4add call _C4add mov W0, [W14] So my current understanding is to pass 4 shorts (2 floats) would mean something like this: ( f1l f1h f2l f2h -- fl fh ) mov [W14--], W0 ; f2h mov [W14--], W1 ; f2l mov [W14--], W2 ; f1h mov [W14], W3 ; f1l .extern Cfadd call _Cfadd mov W0, [W14++] ; fl mov W1, [W14] ; fh Am I correct?? Thanks, P. ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds _______________________________________________ Flashforth-devel mailing list Fla...@li... https://lists.sourceforge.net/lists/listinfo/flashforth-devel >>> >> > |
From: pito <pi...@vo...> - 2014-07-16 08:29:21
|
Ok, reordered: 100000. d>f 7 s>f Cf/ ok<#,ram> 14043 18015 f. 14285.7 ok<#,ram> 1000000. d>f 7 s>f Cf/ fs. 1.42857E5 ok<#,ram> forth: bench/ 13.2768E3 CPU INSTRs per f/ ok<#,ram> Cf/: bench/ 435.743E0 CPU INSTRs per f/ ok<#,ram> 13276 / 436 = 30x faster Nice.. Pito. ______________________________________________________________ > Od: "pito" <pi...@vo...> > Komu: Mikael Nordman <mik...@pp...>, "flashforth-devel" <fla...@li...> > Datum: 16.07.2014 09:49 > Předmět: Re: [Flashforth-devel] C stack - passing the params (pic24/33) > >It works basically, but the order of the operands and its words is weird, so I have to swap everything before calling Cfsub. >So the order of the shorts passed needs to be rearranged.. > >"30000 - 10000" = > >10000 s>f swap 30000 s>f swap Cf- f. 20000.0 ok<#,ram> > >However, even with 2 addtional swaps I get following result for Cfsub: > >forth version: >bench- 2.72317E3 CPU INSTRs per f- ok<#,ram> > >Cf- version: >bench- 283.740E0 CPU INSTRs per f- ok<#,ram> > >So the C version of the f- is ~10x faster than the forth version. Nice... > >Pito > > > > > >______________________________________________________________ >> Od: Mikael Nordman <mik...@pp...> >> Komu: <pi...@vo...>, <fla...@li...> >> Datum: 16.07.2014 08:53 >> Předmět: Re: [Flashforth-devel] C stack - passing the params (pic24/33) >> >>Probably, but check the xc16 help section. I think it describes the parameter passing. >> >>Mike >> >>Sent from my LG Mobile >> >>------ Original message------ >> >>From: pito >> >>Date: Wed, 16/07/2014 02:52 >> >>To: flashforth-devel; >> >>Subject:[Flashforth-devel] C stack - passing the params (pic24/33) >> >>In the C example we pass a single 16bit short param: mov [W14], W0 .extern C4add call _C4add mov W0, [W14] So my current understanding is to pass 4 shorts (2 floats) would mean something like this: ( f1l f1h f2l f2h -- fl fh ) mov [W14--], W0 ; f2h mov [W14--], W1 ; f2l mov [W14--], W2 ; f1h mov [W14], W3 ; f1l .extern Cfadd call _Cfadd mov W0, [W14++] ; fl mov W1, [W14] ; fh Am I correct?? Thanks, P. ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds _______________________________________________ Flashforth-devel mailing list Fla...@li... https://lists.sourceforge.net/lists/listinfo/flashforth-devel >> > |
From: pito <pi...@vo...> - 2014-07-16 07:49:28
|
It works basically, but the order of the operands and its words is weird, so I have to swap everything before calling Cfsub. So the order of the shorts passed needs to be rearranged.. "30000 - 10000" = 10000 s>f swap 30000 s>f swap Cf- f. 20000.0 ok<#,ram> However, even with 2 addtional swaps I get following result for Cfsub: forth version: bench- 2.72317E3 CPU INSTRs per f- ok<#,ram> Cf- version: bench- 283.740E0 CPU INSTRs per f- ok<#,ram> So the C version of the f- is ~10x faster than the forth version. Nice... Pito ______________________________________________________________ > Od: Mikael Nordman <mik...@pp...> > Komu: <pi...@vo...>, <fla...@li...> > Datum: 16.07.2014 08:53 > Předmět: Re: [Flashforth-devel] C stack - passing the params (pic24/33) > >Probably, but check the xc16 help section. I think it describes the parameter passing. > >Mike > >Sent from my LG Mobile > >------ Original message------ > >From: pito > >Date: Wed, 16/07/2014 02:52 > >To: flashforth-devel; > >Subject:[Flashforth-devel] C stack - passing the params (pic24/33) > >In the C example we pass a single 16bit short param: mov [W14], W0 .extern C4add call _C4add mov W0, [W14] So my current understanding is to pass 4 shorts (2 floats) would mean something like this: ( f1l f1h f2l f2h -- fl fh ) mov [W14--], W0 ; f2h mov [W14--], W1 ; f2l mov [W14--], W2 ; f1h mov [W14], W3 ; f1l .extern Cfadd call _Cfadd mov W0, [W14++] ; fl mov W1, [W14] ; fh Am I correct?? Thanks, P. ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds _______________________________________________ Flashforth-devel mailing list Fla...@li... https://lists.sourceforge.net/lists/listinfo/flashforth-devel > |
From: Mikael N. <mik...@pp...> - 2014-07-16 06:52:26
|
<div style="font-size:10pt;"><p style="margin-top:0;margin-bottom:0;">Probably, but check the xc16 help section. I think it describes the parameter passing.</p><p style="margin-top:0;margin-bottom:0;">Mike</p><p style="margin-top:0;margin-bottom:0;"> </p><div><signature_tag><p style="margin-top:0;margin-bottom:0;">Sent from my LG Mobile</p></signature_tag></div><p id="last_enter" style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;">------ Original message------</p> <p style="margin-top:0;margin-bottom:0;"><b>From: </b>pito<pi...@vo...></p><p style="margin-top:0;margin-bottom:0;"><b>Date: </b>Wed, 16/07/2014 02:52</p><p style="margin-top:0;margin-bottom:0;"><b>To: </b>flashforth-devel;</p><p style="margin-top:0;margin-bottom:0;"><b>Subject:</b>[Flashforth-devel] C stack - passing the params (pic24/33)</p><p style="margin-top:0;margin-bottom:0;"> </p><pre>In the C example we pass a single 16bit short param: mov [W14], W0 .extern C4add call _C4add mov W0, [W14] So my current understanding is to pass 4 shorts (2 floats) would mean something like this: ( f1l f1h f2l f2h -- fl fh ) mov [W14--], W0 ; f2h mov [W14--], W1 ; f2l mov [W14--], W2 ; f1h mov [W14], W3 ; f1l .extern Cfadd call _Cfadd mov W0, [W14++] ; fl mov W1, [W14] ; fh Am I correct?? Thanks, P. ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds _______________________________________________ Flashforth-devel mailing list Fla...@li... https://lists.sourceforge.net/lists/listinfo/flashforth-devel </pre></div> |
From: pito <pi...@vo...> - 2014-07-15 23:52:24
|
In the C example we pass a single 16bit short param: mov [W14], W0 .extern C4add call _C4add mov W0, [W14] So my current understanding is to pass 4 shorts (2 floats) would mean something like this: ( f1l f1h f2l f2h -- fl fh ) mov [W14--], W0 ; f2h mov [W14--], W1 ; f2l mov [W14--], W2 ; f1h mov [W14], W3 ; f1l .extern Cfadd call _Cfadd mov W0, [W14++] ; fl mov W1, [W14] ; fh Am I correct?? Thanks, P. |
From: pito <pi...@vo...> - 2014-07-13 15:21:39
|
A quick benchmark: I did some tests in past with amforth on atmega1284p @25MHz. So let us compare: FF: ======================================== : tst_f+ 30000 0 do _pi _ln2 f+ drop drop loop ; ok<#,ram> Fcy u. 46062 ok<#,ram> : b+ ticks tst_f+ ticks swap - s>f 1000 s>f f/ 30000 s>f f/ fs. ." sec per f+" ; ok<#,ram> b+ 5.21667E-5 sec per f+ ok<#,ram> Clock to clock: ========================================= amforth: @25MHz took 1060 usec ff: @46MHz took 52.2 usec == 96 usec @25MHz ff is ~11x faster in f+ than amforth c2c P. ______________________________________________________________ > Od: pito <pi...@vo...> > Komu: "flashforth-devel" <fla...@li...>, "flashforth-devel" <fla...@li...> > Datum: 13.07.2014 14:26 > Předmět: [Flashforth-devel] FF50 (dspic33) Floating Point Beta working > >This is with the Beta modified Leon's FP for FF50 (dspic33). Seems to be _much_ faster than on amforth. >Still som issues to fix. Input is done via double or single integer with conversions to float (see below). >Precision set to 6 digits (fp single precision only). >Will continue when Mike is back from holidays.. :) > >marker _tstflt_ ok<#,ram> > ok<#,ram> >314159265. d>f 100000000. d>f f/ fconstant _pi ok<#,ram> > ok<#,ram> >cr _pi fdup fdup f. fs. fe. >3.14159 3.14159E0 3.14159E0 ok<#,ram> > ok<#,ram> >-314159265. d>f 100000000. d>f f/ fconstant _-pi ok<#,ram> > ok<#,ram> >cr _-pi fdup fdup f. fs. fe. >-3.14159 -3.14159E0 -3.14159E0 ok<#,ram> > ok<#,ram> >1000000. d>f fconstant _1e6 ok<#,ram> > ok<#,ram> >cr _1e6 fdup fdup f. fs. fe. >1000000. 1.00000E6 1.00000E6 ok<#,ram> > ok<#,ram> >100 s>f fconstant _100 ok<#,ram> > ok<#,ram> >cr _100 fdup fdup f. fs. fe. >100.000 1.00000E2 100.000E0 ok<#,ram> > ok<#,ram> >\ : prntpi _1e6 _100 f* f* f>d d. ; ok<#,ram> > ok<#,ram> >\ +pi f* f/ ok<#,ram> > ok<#,ram> >: test1 > _1e6 fdup fdup fdup fdup > f* f* f* f* > _pi > fswap > f/ > _1e6 fdup fdup fdup fdup > f* f* f* f* f* > > fdup fdup f. fs. fe. ( the result shall be 3.14159265 ) >; ok<#,ram> > ok<#,ram> >: test2 > _pi _1e6 f/ _1e6 f/ _1e6 f/ _1e6 f/ _1e6 f/ > _1e6 fdup fdup fdup fdup > f* f* f* f* f* > fdup fdup f. fs. fe. ( the result shall be 3.14159265 ) >; ok<#,ram> > ok<#,ram> >\ -pi f* f/ ok<#,ram> > ok<#,ram> >: test3 > _1e6 fdup fdup fdup fdup > f* f* f* f* > _-pi > fswap > f/ > _1e6 fdup fdup fdup fdup > f* f* f* f* f* > > fdup fdup f. fs. fe. ( the result shall be -3.14159265 ) >; ok<#,ram> > ok<#,ram> >: test4 > _-pi _1e6 f/ _1e6 f/ _1e6 f/ _1e6 f/ _1e6 f/ > _1e6 fdup fdup fdup fdup > f* f* f* f* f* > fdup fdup f. fs. fe. ( the result shall be -3.14159265 ) >; ok<#,ram> > ok<#,ram> >test1 3.14159 3.14159E0 3.14159E0 ok<#,ram> >test2 3.14159 3.14159E0 3.14159E0 ok<#,ram> >test3 -3.14159 -3.14159E0 -3.14159E0 ok<#,ram> >test4 -3.14159 -3.14159E0 -3.14159E0 ok<#,ram> > ok<#,ram> > ok<#,ram> >1000000. d>f 7 s>f f/ fdup fdup f. fs. fe. 142857. 1.42857E5 142.857E3 ok<#,ram> >-1000000. d>f 7 s>f f/ fdup fdup f. fs. fe. -142857. -1.42857E5 -142.857E3 ok<#,ram> >300000. d>f 555555. d>f f+ fdup fdup f. fs. fe. 855555. 8.55555E5 855.555E3 ok<#,ram> >-300000. d>f 555555. d>f f+ fdup fdup f. fs. fe. 255555. 2.55555E5 255.555E3 ok<#,ram> >-300000. d>f -555555. d>f f+ fdup fdup f. fs. fe. -855555. -8.55555E5 -855.555E3 ok<#,ram> >-300000. d>f -555555. d>f f- fdup fdup f. fs. fe. 255555. 2.55555E5 255.555E3 ok<#,ram> > >\ Earth's volume and mass >\ E. radius in m (Wiki: equatorial radius) >6378100. d>f fconstant earthradius ok<#,ram> >\ E. volume in m3 (Wiki: 1.08321×10^12 km3) >earthradius fdup fdup f* f* _pi f* 4 s>f f* 3 s>f f/ earthvolume f! earthvolume f@ fdup fdup cr f. fs. fe. >1086830000000000000000. 1.08683E21 1.08683E21 ok<#,ram> >\ E. density 5.515 g/cm3 (Wiki) >5515 s>f 1000 s>f f/ 100 s>f fdup fdup f* f* f* earthvolume f@ f* ok<#,ram> 61481 28058 >\ E. mass in g >fdup fs. 5.99388E27 ok<#,ram> 61481 28058 >\ E. mass in kg >1000 s>f f/ ok<#,ram> 43033 26782 >fs. 5.99388E24 ok<#,ram> >\ Earth mass in kg, Wiki: 5.97219×10^24 kg >5.99388E24 > >------------------------------------------------------------------------------ >_______________________________________________ >Flashforth-devel mailing list >Fla...@li... >https://lists.sourceforge.net/lists/listinfo/flashforth-devel > |
From: pito <pi...@vo...> - 2014-07-13 12:26:39
|
This is with the Beta modified Leon's FP for FF50 (dspic33). Seems to be _much_ faster than on amforth. Still som issues to fix. Input is done via double or single integer with conversions to float (see below). Precision set to 6 digits (fp single precision only). Will continue when Mike is back from holidays.. :) marker _tstflt_ ok<#,ram> ok<#,ram> 314159265. d>f 100000000. d>f f/ fconstant _pi ok<#,ram> ok<#,ram> cr _pi fdup fdup f. fs. fe. 3.14159 3.14159E0 3.14159E0 ok<#,ram> ok<#,ram> -314159265. d>f 100000000. d>f f/ fconstant _-pi ok<#,ram> ok<#,ram> cr _-pi fdup fdup f. fs. fe. -3.14159 -3.14159E0 -3.14159E0 ok<#,ram> ok<#,ram> 1000000. d>f fconstant _1e6 ok<#,ram> ok<#,ram> cr _1e6 fdup fdup f. fs. fe. 1000000. 1.00000E6 1.00000E6 ok<#,ram> ok<#,ram> 100 s>f fconstant _100 ok<#,ram> ok<#,ram> cr _100 fdup fdup f. fs. fe. 100.000 1.00000E2 100.000E0 ok<#,ram> ok<#,ram> \ : prntpi _1e6 _100 f* f* f>d d. ; ok<#,ram> ok<#,ram> \ +pi f* f/ ok<#,ram> ok<#,ram> : test1 _1e6 fdup fdup fdup fdup f* f* f* f* _pi fswap f/ _1e6 fdup fdup fdup fdup f* f* f* f* f* fdup fdup f. fs. fe. ( the result shall be 3.14159265 ) ; ok<#,ram> ok<#,ram> : test2 _pi _1e6 f/ _1e6 f/ _1e6 f/ _1e6 f/ _1e6 f/ _1e6 fdup fdup fdup fdup f* f* f* f* f* fdup fdup f. fs. fe. ( the result shall be 3.14159265 ) ; ok<#,ram> ok<#,ram> \ -pi f* f/ ok<#,ram> ok<#,ram> : test3 _1e6 fdup fdup fdup fdup f* f* f* f* _-pi fswap f/ _1e6 fdup fdup fdup fdup f* f* f* f* f* fdup fdup f. fs. fe. ( the result shall be -3.14159265 ) ; ok<#,ram> ok<#,ram> : test4 _-pi _1e6 f/ _1e6 f/ _1e6 f/ _1e6 f/ _1e6 f/ _1e6 fdup fdup fdup fdup f* f* f* f* f* fdup fdup f. fs. fe. ( the result shall be -3.14159265 ) ; ok<#,ram> ok<#,ram> test1 3.14159 3.14159E0 3.14159E0 ok<#,ram> test2 3.14159 3.14159E0 3.14159E0 ok<#,ram> test3 -3.14159 -3.14159E0 -3.14159E0 ok<#,ram> test4 -3.14159 -3.14159E0 -3.14159E0 ok<#,ram> ok<#,ram> ok<#,ram> 1000000. d>f 7 s>f f/ fdup fdup f. fs. fe. 142857. 1.42857E5 142.857E3 ok<#,ram> -1000000. d>f 7 s>f f/ fdup fdup f. fs. fe. -142857. -1.42857E5 -142.857E3 ok<#,ram> 300000. d>f 555555. d>f f+ fdup fdup f. fs. fe. 855555. 8.55555E5 855.555E3 ok<#,ram> -300000. d>f 555555. d>f f+ fdup fdup f. fs. fe. 255555. 2.55555E5 255.555E3 ok<#,ram> -300000. d>f -555555. d>f f+ fdup fdup f. fs. fe. -855555. -8.55555E5 -855.555E3 ok<#,ram> -300000. d>f -555555. d>f f- fdup fdup f. fs. fe. 255555. 2.55555E5 255.555E3 ok<#,ram> \ Earth's volume and mass \ E. radius in m (Wiki: equatorial radius) 6378100. d>f fconstant earthradius ok<#,ram> \ E. volume in m3 (Wiki: 1.08321×10^12 km3) earthradius fdup fdup f* f* _pi f* 4 s>f f* 3 s>f f/ earthvolume f! earthvolume f@ fdup fdup cr f. fs. fe. 1086830000000000000000. 1.08683E21 1.08683E21 ok<#,ram> \ E. density 5.515 g/cm3 (Wiki) 5515 s>f 1000 s>f f/ 100 s>f fdup fdup f* f* f* earthvolume f@ f* ok<#,ram> 61481 28058 \ E. mass in g fdup fs. 5.99388E27 ok<#,ram> 61481 28058 \ E. mass in kg 1000 s>f f/ ok<#,ram> 43033 26782 fs. 5.99388E24 ok<#,ram> \ Earth mass in kg, Wiki: 5.97219×10^24 kg 5.99388E24 |
From: Mikael N. <mik...@pp...> - 2014-07-12 18:51:25
|
<div style="font-size:10pt;"><p style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;">Literal is immediate.</p><p style="margin-top:0;margin-bottom:0;">You have to postpone it.</p><p style="margin-top:0;margin-bottom:0;">Max word lenght is 15 chars.</p><p style="margin-top:0;margin-bottom:0;">Mike</p><div><signature_tag><p style="margin-top:0;margin-bottom:0;">Sent from my LG Mobile</p></signature_tag></div><p id="last_enter" style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;">------ Original message------</p> <p style="margin-top:0;margin-bottom:0;"><b>From: </b>pito<pi...@vo...></p><p style="margin-top:0;margin-bottom:0;"><b>Date: </b>Sat, 12/07/2014 19:18</p><p style="margin-top:0;margin-bottom:0;"><b>To: </b>Mikael Nordman;flashforth-devel;</p><p style="margin-top:0;margin-bottom:0;"><b>Subject:</b>Re: [Flashforth-devel] FF50 dspic33 - some missing words for fp</p><p style="margin-top:0;margin-bottom:0;"> </p><pre>Thanks Mike, tibsize increased to 128.. Interestingly I get following ? when loading (no errors before that) : fliteral swap literal literal ; ok<#,ram> SP ? why? and : fmakesignificand ( d -- f-with-exponent=-127 ) ? does it mean the word name is too long? P. ______________________________________________________________ > Od: Mikael Nordman <mik...@pp...> > Komu: <fla...@li...> > Datum: 12.07.2014 17:53 > Předmět: Re: [Flashforth-devel] FF50 dspic33 - some missing words for fp > >Just increase the tibsize in the config file. > >Mike > >Sent from my LG Mobile > >------ Original message------ > >From: pito > >Date: Sat, 12/07/2014 16:29 > >To: flashforth-devel; > >Subject:[Flashforth-devel] FF50 dspic33 - some missing words for fp > >I am trying to load the Leon's fp library, which may work "as-is". We do not need recogniser for the initial experiments, as we can enter the fp numbers as doubles. I missed a few words there ie. ?dup 2>r 2r> which I added, still need the equivalents for @i i !i compile not sp0 size number BTW where I can set the number of chars the FF50 reads from input?? It seems it does 75 only (even the rx buffer is 80 now)? How can I increase the number to at least 80? P. ------------------------------------------------------------------------------ _______________________________________________ Flashforth-devel mailing list Fla...@li... https://lists.sourceforge.net/lists/listinfo/flashforth-devel > >---------- > >------------------------------------------------------------------------------ > > >---------- > >_______________________________________________ >Flashforth-devel mailing list >Fla...@li... >https://lists.sourceforge.net/lists/listinfo/flashforth-devel > </pre></div> |
From: pito <pi...@vo...> - 2014-07-12 16:18:40
|
Thanks Mike, tibsize increased to 128.. Interestingly I get following ? when loading (no errors before that) : fliteral swap literal literal ; ok<#,ram> SP ? why? and : fmakesignificand ( d -- f-with-exponent=-127 ) ? does it mean the word name is too long? P. ______________________________________________________________ > Od: Mikael Nordman <mik...@pp...> > Komu: <fla...@li...> > Datum: 12.07.2014 17:53 > Předmět: Re: [Flashforth-devel] FF50 dspic33 - some missing words for fp > >Just increase the tibsize in the config file. > >Mike > >Sent from my LG Mobile > >------ Original message------ > >From: pito > >Date: Sat, 12/07/2014 16:29 > >To: flashforth-devel; > >Subject:[Flashforth-devel] FF50 dspic33 - some missing words for fp > >I am trying to load the Leon's fp library, which may work "as-is". We do not need recogniser for the initial experiments, as we can enter the fp numbers as doubles. I missed a few words there ie. ?dup 2>r 2r> which I added, still need the equivalents for @i i !i compile not sp0 size number BTW where I can set the number of chars the FF50 reads from input?? It seems it does 75 only (even the rx buffer is 80 now)? How can I increase the number to at least 80? P. ------------------------------------------------------------------------------ _______________________________________________ Flashforth-devel mailing list Fla...@li... https://lists.sourceforge.net/lists/listinfo/flashforth-devel > >---------- > >------------------------------------------------------------------------------ > > >---------- > >_______________________________________________ >Flashforth-devel mailing list >Fla...@li... >https://lists.sourceforge.net/lists/listinfo/flashforth-devel > |