You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(5) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
(6) |
Mar
(41) |
Apr
(23) |
May
(11) |
Jun
(2) |
Jul
|
Aug
|
Sep
(9) |
Oct
(2) |
Nov
(1) |
Dec
(1) |
2008 |
Jan
(6) |
Feb
(1) |
Mar
(23) |
Apr
(18) |
May
(21) |
Jun
(13) |
Jul
(34) |
Aug
(5) |
Sep
(1) |
Oct
(4) |
Nov
|
Dec
(4) |
2009 |
Jan
|
Feb
(5) |
Mar
(5) |
Apr
(10) |
May
(1) |
Jun
(11) |
Jul
(1) |
Aug
|
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(13) |
2010 |
Jan
(10) |
Feb
(4) |
Mar
(28) |
Apr
(3) |
May
(38) |
Jun
(22) |
Jul
(92) |
Aug
(154) |
Sep
(218) |
Oct
(45) |
Nov
(20) |
Dec
(1) |
2011 |
Jan
(33) |
Feb
(15) |
Mar
(32) |
Apr
(33) |
May
(48) |
Jun
(35) |
Jul
(7) |
Aug
|
Sep
(11) |
Oct
(5) |
Nov
|
Dec
(7) |
2012 |
Jan
(56) |
Feb
(11) |
Mar
(6) |
Apr
|
May
(128) |
Jun
(59) |
Jul
(21) |
Aug
(16) |
Sep
(24) |
Oct
(39) |
Nov
(12) |
Dec
(12) |
2013 |
Jan
(14) |
Feb
(61) |
Mar
(97) |
Apr
(46) |
May
(13) |
Jun
(23) |
Jul
(12) |
Aug
(25) |
Sep
(9) |
Oct
(81) |
Nov
(73) |
Dec
(45) |
2014 |
Jan
(36) |
Feb
(57) |
Mar
(20) |
Apr
(41) |
May
(43) |
Jun
(11) |
Jul
(14) |
Aug
(32) |
Sep
(9) |
Oct
(27) |
Nov
(21) |
Dec
(6) |
2015 |
Jan
(14) |
Feb
(23) |
Mar
(1) |
Apr
(19) |
May
(40) |
Jun
(11) |
Jul
(1) |
Aug
(2) |
Sep
(14) |
Oct
(10) |
Nov
(9) |
Dec
(13) |
2016 |
Jan
(4) |
Feb
(3) |
Mar
(7) |
Apr
|
May
(4) |
Jun
(13) |
Jul
(8) |
Aug
(3) |
Sep
(4) |
Oct
(1) |
Nov
|
Dec
|
2017 |
Jan
(6) |
Feb
(1) |
Mar
(1) |
Apr
(7) |
May
(10) |
Jun
(5) |
Jul
(7) |
Aug
(9) |
Sep
|
Oct
(1) |
Nov
(5) |
Dec
|
2018 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
(3) |
Jul
(6) |
Aug
|
Sep
(2) |
Oct
(54) |
Nov
(47) |
Dec
(53) |
2019 |
Jan
(23) |
Feb
(24) |
Mar
(19) |
Apr
(15) |
May
(5) |
Jun
(34) |
Jul
(9) |
Aug
(9) |
Sep
(3) |
Oct
(2) |
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
(7) |
Apr
(7) |
May
(5) |
Jun
(15) |
Jul
(22) |
Aug
(28) |
Sep
(13) |
Oct
(9) |
Nov
(17) |
Dec
(13) |
2021 |
Jan
(5) |
Feb
(1) |
Mar
(1) |
Apr
(9) |
May
(21) |
Jun
(9) |
Jul
|
Aug
(6) |
Sep
(16) |
Oct
|
Nov
(1) |
Dec
(6) |
2022 |
Jan
|
Feb
|
Mar
|
Apr
(7) |
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(11) |
Sep
(21) |
Oct
(5) |
Nov
(1) |
Dec
(1) |
2024 |
Jan
(1) |
Feb
(4) |
Mar
|
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Erich W. <ew....@na...> - 2012-01-21 10:19:33
|
Hello Robert, On 01/20/2012 08:25 AM, Robert Epprecht wrote: > Despite the fact that I'm in a beginners exploring phase and absolutely > want to reinvent the wheel myself and try to understand every single bit I'm all for it! > I am still very interested to look at your code to have some working > examples to learn from. Ok, I promise to release some bits onto the list. If I'm not fast enough, feel free to remind me. To all: The could be more code snippets circulating on the list ... Cheers, Erich |
From: Erich W. <ew....@na...> - 2012-01-21 10:06:05
|
Hello Robert, On 01/20/2012 07:49 AM, Robert Epprecht wrote: > 3 TCCR0B c! > does not hang the system, but does not tick either. > > 4 TCCR0B c! > hangs system, had to re-flash amforth > often also takes my /dev/ttyACM0 down and I have to reboot linux > (which looks to me like a linux kernel issue). > > 5 TCCR0B c! > reset? > The system starts to print the boot message interruptet by some > bytes of garbage and endlessly repeats that. > > > Confused, > Robert You did check these hard coded numbers against the datasheet, did you? The atmega32 (where my code works) and the atmega328p (on the arduino board) are different in unexpected places. For example: sleep.asm The bits controlling sleep mode are in the register MCUCR on atmega32 and in the separate register SMCR on atmega328p. Cheers, Erich |
From: pito <pi...@vo...> - 2012-01-20 15:25:22
|
..long time back.. maybe somebody finds it useful.. provided as-is.. Time measurement (with float results) 48bit timer (timer + epoch) for 1284p: \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ 2007-12-26 EW w4_clock_tick.fs \ 2010-09-02 PITO - FLOAT TIME MEASUREMENT ATMEGA 1284P \ +timer register and enable interupt \ -timer disable interupt marker -mytimer 2variable timer variable epoch 1. 2constant _one 0. 2constant _zero 1 s>f fconstant f1.0 $B1 constant TCCR2B $B6 constant ASSR $70 constant TIMSK2 $016 constant TIMER2_OVFAddr \ overflow2 interupt service routine \ increment tick timer : tick_isr timer 2@ 2dup _one d+ timer 2! 0= if epoch @ 1+ epoch ! then ; \ enable ticks \ overflow fires each f_cpu/256/256 : +timer $6 TCCR2B c! ( prescaler 110b = f_cpu/256 ) $0 ASSR c! ( source: internal f_cpu) ['] tick_isr TIMER2_OVFAddr int! ( do register the interrupt ) 0 epoch ! _zero timer 2! ( clear the timer at start ) TIMSK2 c@ $01 or TIMSK2 c! ( do enable the timer2 interrupt ) ; \ disable ticks : -timer TIMSK2 c@ $fe and TIMSK2 c! ( disable - clr timer2 interrupt ) ; \ MEASURE TIME IN SECONDS (FLOAT) decimal 2variable 0_ticks \ tick_in_secs = 1 / f_cpu / 256 / 256 f_cpu d>f 256 s>f f/ 256 s>f f/ f1.0 fswap f/ fconstant tick_in_secs : timer-start ( -- ) timer 2@ 0_ticks 2! ; : .elapsed ( -- ) timer 2@ 0_ticks 2@ d- d>f tick_in_secs f* 3 fsn. ." secs " ; \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ and "zero drift clock" - it increments in one second interval - when you know the exact crystal frequency (ie f_cpu = 12.487.388 Hz) then you get a precise second - none other tweaking required \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ marker _zerodriftclock_ \ ZERO DRIFT CLOCK \ IT USES F_CPU ONLY (XTAL FREQUENCY SHALL BE KNOWN AS PRECISE AS \ POSSIBLE) FOR PRECISE 1 SECOND INCREMENT \ IT WORKS WITH _ANY_ VALUE XTAL \ THE SECONDS ARE INCREMENTED IN 1 SEC INTERVAL \ USES TIMER2 ATMEGA32 \ Pito July2010 decimal 2variable ticker variable seconds 262144. 2constant clkpi ( clk per interrupt = 256*prescaler ) 1. ticker 2! 0 seconds ! \ overflow2 interupt service routine \ ! not optimised yet : tick_isr ticker 2@ clkpi d- ticker 2! ticker 2@ clkpi d< if f_cpu ticker 2@ d+ ticker 2! 1 seconds +! then ; hex \ enable ticks : +ticks 7 TCCR2 c! ( 111b = f_cpu clock/1024 ) 0 ASSR c! ( source: internal clock f_cpu) ['] tick_isr TIMER2_OVFAddr int! ( register interupt ) TIMSK c@ 40 or TIMSK c! ( enable timer2 interupt ) ; \ disable ticks : -ticks TIMSK c@ [ 40 invert ff and ] literal and TIMSK c! ( clr timer2 ) ; decimal : shwticker 1000 0 do cr ticker 2@ d. space seconds @ u. loop ; : shwsec seconds @ u. ; \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ p. -- - - Reklama - - - - - - - - - - - - - - Lyže, snowboardy, monoski, sáňky, brusle, sněžnice a další kluzadla oprášit, zimní radovánky jsou tu! Speciál Zima portálu VOLNÝ.cz najdete na http://bit.ly/ymcefA |
From: Mark M. <m.m...@gm...> - 2012-01-20 12:53:48
|
Working with the ATMega328, I found that I had to set the prescaler (TCCR0B) after I assigned the interrupt vector. So, you might try : tim0start ( -- ) tim0ini +tim0int 5 TCCR0B c! ; (remove the prescaler store from tim0ini ) It worked for me. BTW thanks to the list for help with the lfuse clock issue... obviously I got it solved! On Fri, Jan 20, 2012 at 7:07 AM, Robert Epprecht <epp...@so...> wrote: > Matthias Trute <mt...@we...> writes: > > My chip is labelled ATMEGA-328-PU > I have included atmega328p.frt > Hope that's ok? > > > Are the numbers behind the T-labels correct (memory mapped addresses, > > somewhere around $40ff) for the Atmega328p? > hex TCCR0A . > 44 > > > Otherwise it looks like you're programming > > the wrong controller. > ??? > > > Loosing the ACM device is really strange, > yes > > > need-to-reflash by writing a single byte is > > very unusual as well. > well this single byte was enabling an interrupt, > but strange anyway... > > Robert > > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel > |
From: Robert E. <epp...@so...> - 2012-01-20 12:08:35
|
Matthias Trute <mt...@we...> writes: My chip is labelled ATMEGA-328-PU I have included atmega328p.frt Hope that's ok? > Are the numbers behind the T-labels correct (memory mapped addresses, > somewhere around $40ff) for the Atmega328p? hex TCCR0A . 44 > Otherwise it looks like you're programming > the wrong controller. ??? > Loosing the ACM device is really strange, yes > need-to-reflash by writing a single byte is > very unusual as well. well this single byte was enabling an interrupt, but strange anyway... Robert |
From: Robert E. <epp...@so...> - 2012-01-20 11:51:52
|
Matthias Trute <mt...@we...> writes: >> ImportError: No module named fdpexpect > ii python-pexpect 2.3-1ubuntu Yes, that was the problem here. Uploading a very short first testfile to the uno with amforth-shell.py went fine now :) Thanks a lot, Robert |
From: Matthias T. <mt...@we...> - 2012-01-20 08:47:30
|
Hi, > But here we go: > Whats wrong with the following simple test code: looks innocent (haven't tried it however) > The result on my arduino uno is quite inconsistent, but mostly I see: > > 3 TCCR0B c! > does not hang the system, but does not tick either. > > 4 TCCR0B c! > hangs system, had to re-flash amforth > often also takes my /dev/ttyACM0 down and I have to reboot linux > (which looks to me like a linux kernel issue). > > 5 TCCR0B c! > reset? > The system starts to print the boot message interruptet by some > bytes of garbage and endlessly repeats that. Are the numbers behind the T-labels correct (memory mapped addresses, somewhere around $40ff) for the Atmega328p? I did something similiar for the atmega16 without any trouble. Otherwise it looks like you're programming the wrong controller. Loosing the ACM device is really strange, need-to-reflash by writing a single byte is very unusual as well. Matthias |
From: Matthias T. <mt...@we...> - 2012-01-20 08:41:42
|
Robert, > import fdpexpect > ImportError: No module named fdpexpect > > Is this a debian python installation problem? Most probably. My ubuntu 11.10 has the package > dpkg -l | grep python | grep exp ii python-pexpect 2.3-1ubuntu installed automatically, IIRC. HTH Matthias |
From: Robert E. <epp...@so...> - 2012-01-20 07:26:46
|
Erich Waelde <ew....@na...> writes: > "Measuring time" is more diverse than it seems. [ very good list skipped ] Yes, I know. I have experimented with many of these situations in arduino c dialect before. > [...] use any timer, feed it any availabe clock_source/prescaler > combination. Clear the timer register, start the timer, stop > and read the timer ... Thats what I try to do as a very first test. Looks like I don't get how to do it (see other post). > It all depends on the conditions. How long is the time, you > want to measure? How accurate should it be? I have different applications in mind with different requirements. I think I should be able to figure that part out once I'm over the very basic problems like uploading files and timer initialisation. > I can provide code for some of these, if you are interested. Despite the fact that I'm in a beginners exploring phase and absolutely want to reinvent the wheel myself and try to understand every single bit I am still very interested to look at your code to have some working examples to learn from. Robert |
From: Robert E. <epp...@so...> - 2012-01-20 06:49:45
|
Exploring amforth on my arduino uno is a bit difficult without a working upload tool. I help myself with a simple bash script which just waits after characters and newlines and works often (but not always) for short single files and is s l o o o o w ... But here we go: Whats wrong with the following simple test code: \ ################################################################ marker _TIMER0_ variable ticks : tim0isr ( -- ) 1 ticks +! ; \ timer0 ISR : tim0ini ( -- ) \ initialize timer0 0 ticks ! 0 TCNT0 c! \ clear counter 0 TCCR0A c! \ normal mode 4 TCCR0B c! \ internal clock /256 \ hangs system, had to re-flash amforth \ some variants: \ 3 TCCR0B c! \ internal clock, prescaler set to 64 \ does NOT tick \ TCCR0B c@ &fff8 and 3 or TCCR0B c! \ internal clock /64 \ same \ 5 TCCR0B c! \ internal clock /1024 \ reset? ['] tim0isr TIMER0_OVFAddr int! \ ['] noop TIMER0_OVFAddr int! \ just a test ; : +tim0int ( -- ) 1 TIMSK0 c! ; \ enable interrupt : -tim0int ( -- ) 0 TIMSK0 c! ; \ disable interrupt : tim0start ( -- ) tim0ini +tim0int ; \ ################################################################ The result on my arduino uno is quite inconsistent, but mostly I see: 3 TCCR0B c! does not hang the system, but does not tick either. 4 TCCR0B c! hangs system, had to re-flash amforth often also takes my /dev/ttyACM0 down and I have to reboot linux (which looks to me like a linux kernel issue). 5 TCCR0B c! reset? The system starts to print the boot message interruptet by some bytes of garbage and endlessly repeats that. Confused, Robert |
From: Matthias T. <mt...@we...> - 2012-01-19 17:03:28
|
Hi Marcin, > Hello, > > my build of amforth trunk (r957) fails with amforth-eeprom.asm > that VE_ROOT is not defined anywhere. > > It seems that even ONLY restores the wordlist order to contain > FORTH vocabulary and there are no words defined in VE_ROOT. > > A patch below removes the VE_ROOT altogether, but I am not sure > this was intended (some work in progress?) You're right. My mistake, I put some files from the wrong branch of my internal source tree into the sourceforge repository. For now your patch is correct, I may re-introduce the ROOT wordlist in some later revisions.. Sorry Matthias |
From: Erich W. <ew....@na...> - 2012-01-18 15:44:34
|
Hello Christian, On 01/17/2012 10:15 PM, Christian Kellermann wrote: > > I am interested in an example for bit banging, communicating with > a serial device on a digital port. Do you have an example for such > code? yes and no. please find below the code I used to demonstrate a connection to a i2c (twi) device. The device was connected to PortB 3 and 4. This is a *very* simplistic approach, but it does work nicely for i2c devices. No error checking, whatsoever. You can see in the code, a few low level words are needed (sda0, sda1, scl0, scl1, wait) from which the pulse trains for one byte data exchange are constructed (bit>i2c, byte>i2c). Add generating start and stop conditions, and you are pretty much done. This does not implement clock slowing by the addressed device or multi master collision detection. But it's good for some scenarios. That is an example of bit-banging. --- No, I have not tried to build a soft uart or 1-wire in software. How would I go about it? Well, say I want a connection with 9600 baud. Then I need a feeling, of how many forth commands can I run within one Bit transfer time: 1/9600 * 1105920 (crystal) gives 1152 AVR cycles per bit. The idle command loop needs approx. 40 cycles for one round, so we are near 29 rounds per bit. This does not sound too bad. A few commands (assert the current bit, get the next bit, then wait some) seems possible to fit in. *However*, I would try to measure the resulting pulse times and fine tune the words sending one bit with with additional noop commands. IF that does not work, or if busy waiting is not an option, then the next idea would be to use a timer and put the handling of one Bit into the timer overflow isr. I have done this with receiving single bits from a rfm12 434MHz receiver and rotating them into a temporary variable. If you seach the web, I'm sure, something more sophisticated will come up. If you give it a try, be sure to share the code on the list. Cheers, Erich ------------------------------------------------------------------ \ 2011-01-23 EW fosdem i2c bitbang demo \ purely didactic thing. \ for production code use lib/twi.frt marker --start-- decimal PORTB 0 portpin: blue \ sda PORTB 1 portpin: green PORTB 2 portpin: red \ scl PORTB 3 portpin: sda PORTB 4 portpin: scl : sda0 sda low blue high ; : sda1 sda high blue low ; : scl0 scl low red high ; : scl1 scl high red low ; : wait-long &500 0 do 1ms loop ; : wait-short &50 0 do 1ms loop ; \ "function pointer" wait Rdefer wait : slow ['] wait-long is wait ; : fast ['] wait-short is wait ; slow : pulses ( n -- ) 0 ?do red low wait red high wait loop ; \ test "function pointer" : test-wait slow &5 pulses fast &25 pulses ; \ clock a given data bit out : bit>i2c ( bit -- ) if sda1 else sda0 then \ set data scl1 wait scl0 wait \ clock it out ; \ see if bit at pos is set : get.bit ( byte pos -- bit ) 1 swap lshift \ -- byte bitmask and \ -- bit ; \ clock one byte out, MSB first! : byte>i2c ( byte -- ) 8 0 do dup 7 i - \ 7 6 5 ... 0: MSB first! get.bit bit>i2c loop drop ; \ create start, stop conditions : i2c.start sda0 wait scl0 wait ; : i2c.stop scl1 wait sda1 wait ; \ read ack|nack from bus : ack<i2c ( -- t/f ) sda pin_input scl1 wait sda pin_low? sda pin_output scl0 wait ; \ make it really fast! ' noop is wait \ send a byte to pcf8574 : >8io ( x -- ) $40 \ addr i2c.start byte>i2c ack<i2c drop byte>i2c ack<i2c drop i2c.stop ; : i2c.scan $FF 0 do i2c.start i byte>i2c ack<i2c \ -- ack|nack i2c.stop if i . cr then 2 +loop ; : init blue pin_output blue high red pin_output red high sda pin_output sda high scl pin_output scl high \ alternatively \ $ff DDRB c! $ff PORTB c! ['] noop is wait ; : ms 0 ?do 1ms loop ; variable N 0 N ! : run init $00 >8io &1000 ms begin N @ invert >8io 1 N +! &1000 ms key? until key drop ; |
From: Marcin C. <sa...@sa...> - 2012-01-17 23:34:13
|
>> Robert Epprecht <epp...@so...> wrote: > another amforth newbie question > > .res (lib/misc.frt) from the forth prompt gives: > used return stack cells 11 > > 11 cells, why so many? My older amforth 4.3 repors only four cells. You may try to list them all and lookup the words using the assembly list file. //Marcin |
From: Christian K. <ck...@pe...> - 2012-01-17 21:54:30
|
* Erich Waelde <ew....@na...> [120117 22:05]: > * Do you want to produce a pulse train with specific timings? > > PWM might do the job. Waiting and bit banging might do the job. > Extra periphery might do the job, e.g. a 1wire controller connected > to twi. > > > It all depends on the conditions. How long is the time, you > want to measure? How accurate should it be? > > > I can provide code for some of these, if you are interested. I am interested in an example for bit banging, communicating with a serial device on a digital port. Do you have an example for such code? Kind regards, Christian -- Who can (make) the muddy water (clear)? Let it be still, and it will gradually become clear. Who can secure the condition of rest? Let movement go on, and the condition of rest will gradually arise. -- Lao Tse. |
From: Erich W. <ew....@na...> - 2012-01-17 21:05:24
|
Hello Robert, On 01/16/2012 06:49 AM, Robert Epprecht wrote: > "pito"<pi...@vo...> writes: > >> long time back I used these words for time measurements: > [...] > > Thanks, looks easier then i thought it would be. > Will try to do something similar. > > Is there a special reason you selected timer 2? > I was thinking about using timer 0. "Measuring time" is more diverse than it seems. * Do you want to know, how long something takes? Start and Stop condition are in the programm. Then use any timer, feed it any availabe clock_source/prescaler combination. Clear the timer register, start the timer, stop and read the timer ... * Do you want to measure the length of an external event? An external pulse length maybe? Then you can use a timer providing the Input-Capture feature. The rising edge of the external pulse triggers the start of the timer, the falling edge triggers the timer to stop. You need to wait or poll for the event to finish, but then you just read the timer register ... * Do you want to keep track of time? Like in a clock? And maybe periodically run some functions? Then you could use any timer as well. But you could also use timer2, which dann be connected to a clock crystal running at 32768 Hz. If the prescaler is off, this gives 128 timer overflows per second. I call them "ticks". The mainloop runs a routine, which will see that a tick has elapsed. This routine does all the bookkeeping of ticks, seconds, minutes, hours, day, month, year. If a second (or any defined intervall) is over, it will set a flag. The rest of the main loop checks these flags and if set, calls the work to be done. These are called job.tick, job.sec ... in my application. If tracking time like this is not accurate enough, add a phase shift register to the mix. It will basically say: after so many ticks, make some correction. * Do you want to measure a frequency of an external pulse signal? a. count N of them, measure the elapsed time t: f=N/t b. measure the time between consequtive rising edges: f=1/t c. measure some given time intervall and count the pulses: f=N/T * Do you want to produce a pulse train with specific timings? PWM might do the job. Waiting and bit banging might do the job. Extra periphery might do the job, e.g. a 1wire controller connected to twi. It all depends on the conditions. How long is the time, you want to measure? How accurate should it be? I can provide code for some of these, if you are interested. Cheers, Erich |
From: Erich W. <ew....@na...> - 2012-01-17 20:18:08
|
Hello Robert, On 01/17/2012 06:44 AM, Robert Epprecht wrote: > another amforth newbie question > > .res (lib/misc.frt) from the forth prompt gives: > used return stack cells 11 > > 11 cells, why so many? probably not the whole story: The "application" that is running on the freshly programmed controller starts at "cold" and ends at "applturnkey". So you see everything and probably the inner structure of .res itself. No, I have not looked into the code, so this is guessing. Cheers, Erich |
From: Robert E. <epp...@so...> - 2012-01-17 05:45:30
|
another amforth newbie question .res (lib/misc.frt) from the forth prompt gives: used return stack cells 11 11 cells, why so many? Robert |
From: Robert E. <epp...@so...> - 2012-01-16 05:54:03
|
Marcin Cieslak <sa...@sa...> writes: >>> Robert Epprecht <epp...@so...> wrote: >> I need a word similar to arduino micros() to keep track of time. > 1ms ( is wait one microsecond ) > n ms ( wait n microseconds) ) yes, but these are for waiting, not measuring time. Robert |
From: Robert E. <epp...@so...> - 2012-01-16 05:50:25
|
"pito" <pi...@vo...> writes: > long time back I used these words for time measurements: [...] Thanks, looks easier then i thought it would be. Will try to do something similar. Is there a special reason you selected timer 2? I was thinking about using timer 0. Robert |
From: Robert E. <epp...@so...> - 2012-01-16 05:45:36
|
Matthias Trute <mt...@we...> writes: > I've got an major update for the amforth-shell.py script oh, thank you > maybe you could give it a try as well. > amforth-shell.py -u <file-to-upload.frt> etc svn r1140 [with truncated path names] amforth-shell.py -v -t /dev/ttyACM0 -u some-file Traceback (most recent call last): File "amforth-shell.py", line 11, in <module> import fdpexpect ImportError: No module named fdpexpect Is this a debian python installation problem? Robert |
From: Marcin C. <sa...@sa...> - 2012-01-15 20:56:08
|
Hello, my build of amforth trunk (r957) fails with amforth-eeprom.asm that VE_ROOT is not defined anywhere. It seems that even ONLY restores the wordlist order to contain FORTH vocabulary and there are no words defined in VE_ROOT. A patch below removes the VE_ROOT altogether, but I am not sure this was intended (some work in progress?) //Marcin Index: amforth-eeprom.inc =================================================================== --- amforth-eeprom.inc (wersja 1140) +++ amforth-eeprom.inc (kopia robocza) @@ -44,19 +44,16 @@ EE_ENVIRONMENT: .dw VE_ENVHEAD ; environmental queries EE_WL_FORTH: - .dw EE_FORTHWORDLIST; forth-wordlist + .dw EE_FORTHWORDLIST ; forth-wordlist EE_CURRENT: .dw EE_FORTHWORDLIST EE_FORTHWORDLIST: .dw VE_HEAD ; pre-defined (compiled in) wordlist -EE_ROOTWORDLIST: - .dw VE_ROOT ; some root word list EE_ORDERLISTLEN: - .dw 2 + .dw 1 EE_ORDERLIST: ; list of wordlist id, exactly numwordlist entries .dw EE_FORTHWORDLIST ; get/set-order - .dw EE_ROOTWORDLIST - .byte (NUMWORDLISTS-2)*CELLSIZE ; two slots are already used + .byte (NUMWORDLISTS-1)*CELLSIZE ; two slots are already used EE_RECOGNIZERS: EE_RECOGNIZERLISTLEN: |
From: Marcin C. <sa...@sa...> - 2012-01-15 18:52:12
|
>> Robert Epprecht <epp...@so...> wrote: > Does amforth set up a timer to measure time or do I have to do that by > hand? I need a word similar to arduino micros() to keep track of time. > Has somebody already written that? 1ms ( is wait one microsecond ) n ms ( wait n microseconds) ) > btw: What hw initialization (like timers, setting up i/o pins and the > like) does amforth do, if any? Not much, it sets up interrupt handlers and uses serial port in a pretty simple way to communicate with the user. //Marcin |
From: pito <pi...@vo...> - 2012-01-15 17:03:28
|
Robert, long time back I used these words for time measurements: \ 2007-12-26 EW w4_clock_tick.fs \ 2010-09-02 PITO - FLOAT TIME MEASUREMENT ATMEGA 32 \ +timer register and enable interupt \ -timer disable interupt \ this is for mega32 marker -mytimer \ TIMER_COUNTER_2 $42 constant ASSR \ Asynchronous Status Register $45 constant TCCR2 \ Timer/Counter2 Control Register $00A constant TIMER2_OVFAddr \ Timer/Counter2 Overflow $59 constant TIMSK \ Timer/Counter Interrupt Mask Register 2variable timer \ overflow2 interupt service routine \ increment tick : tick_isr 1. timer 2@ d+ timer 2! ; \ enable ticks \ overflow: f_cpu/256/64 : +timer \ $7 TCCR2 c! ( 111b = f_cpu clock/1024 ) $4 TCCR2 c! ( 100b = f_cpu clock/64 ) $0 ASSR c! ( source: internal clock f_cpu) ['] tick_isr TIMER2_OVFAddr int! ( register interrupt ) 0. timer 2! TIMSK c@ $40 or TIMSK c! ( enable timer2 interrupt ) ; \ disable ticks : -timer TIMSK c@ [ $40 invert $ff and ] literal and TIMSK c! ( clr timer2 interrupt ) ; \ MEASURE TIME IN SECONDS (FLOAT) decimal 2variable elapsed_ticks \ tck_ms = 1 / f_cpu / 256 / 64 f_cpu d>f 256 s>f f/ 64 s>f f/ 1 s>f fswap f/ fconstant tck_ms : timer-start ( -- ) timer 2@ elapsed_ticks 2! ; : timer-stop ( -- f ) timer 2@ d>f elapsed_ticks 2@ d>f f- tck_ms f* ; +timer Regards, Pito ----- PŮVODNÍ ZPRÁVA ----- Od: "Robert Epprecht" <epp...@so...> Komu: amf...@li... Předmět: [Amforth] measuring time Datum: 15.1.2012 - 14:28:01 > Does amforth set up a timer to measure time or do > I have to do that by > hand? I need a word similar to arduino micros() to > keep track of time. > Has somebody already written that? > > btw: What hw initialization (like timers, setting > up i/o pins and the > like) does amforth do, if any? > > Robert > > > ------------------------------------------------------------------------------ > > RSA(R) Conference 2012 > Mar 27 - Feb 2 > Save $400 by Jan. 27 > Register now! > http://p.sf.net/sfu/rsa-sfdev2dev2 > _______________________________________________ > Amforth-devel mailing list for > http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel > -- - - Reklama - - - - - - - - - - - - - - Lyže, snowboardy, monoski, sáňky, brusle, sněžnice a další kluzadla oprášit, zimní radovánky jsou tu! Speciál Zima portálu VOLNÝ.cz najdete na http://bit.ly/ymcefA |
From: Matthias T. <mt...@we...> - 2012-01-15 14:46:34
|
Hi Robert, > Does amforth set up a timer to measure time or do I have to do that by > hand? I need a word similar to arduino micros() to keep track of time. > Has somebody already written that? The directory examples may be a starting point. More can be found in the subversion tree /applications (not included into the release files however). http://amforth.svn.sourceforge.net/viewvc/amforth/ > btw: What hw initialization (like timers, setting up i/o pins and the > like) does amforth do, if any? amforth initializes only what it needs for itself: the usart command prompt. Everything else comes from external sources. Matthias |
From: Marcin C. <sa...@sa...> - 2012-01-15 14:28:20
|
>> Torsten Sadowski <tsa...@gm...> wrote: > Hello Marcin, > > This is what I get from avra: > > duemilanove.hex: > [exec] AVRA: advanced AVR macro assembler Version 1.3.0 Build 1 (8 May 2010) > [exec] Copyright (C) 1998-2010. Check out README file for more info > [exec] > [exec] AVRA is an open source assembler for Atmel AVR microcontroller family > [exec] It can be used as a replacement of 'AVRASM32.EXE' the original assembler > [exec] shipped with AVR Studio. We do not guarantee full compatibility for avra. > [exec] > [exec] AVRA comes with NO WARRANTY, to the extent permitted by law. > [exec] You may redistribute copies of avra under the terms > [exec] of the GNU General Public License. > [exec] For more information about these matters, see the files named COPYING. > [exec] > [exec] Pass 1... > [exec] Pass 2... > [exec] done > [exec] > [exec] > [exec] Assembly complete with no errors. > [exec] Segment usage: > [exec] Code : 4927 words (9854 bytes) > [exec] Data : 219 bytes > [exec] EEPROM : 80 bytes > > > I built avra from git sources fetched 3 Dez 17:13. > > avra: > PFA_INTTRAP: > C:00007b 9380 0060 sts intcur, tosl > C:00007d + loadtos > C:00007d 9189 ld tosl, Y+ > C:00007e 9199 ld tosh, Y+ > C:00007f 9468 set ; set the interrupt flag for the inner interpreter > C:000080 + jmp_ DO_NEXT Can you send me a complete listing file? I think I've seen this happening before and I hope to track down this bug. //Marcin |