Search the web
Sign In
New User? Sign Up
avrx · Support group for the AvrX RTOS
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 1881 - 1912 of 1912   Newest  |  < Newer  |  Older >  |  Oldest
Messages: Show Message Summaries   (Group by Topic) Sort by Date v  
#1912 From: "larry barello" <yahoo@...>
Date: Wed Oct 28, 2009 6:40 am
Subject: RE: Big successes for AvrX!
lbarello
Offline Offline
Send Email Send Email
 
Thanks!  I love to hear about projects using AVRX...

-----Original Message-----
From: Wei-Min Shen [mailto:shen@...]
Sent: Tuesday, October 27, 2009 3:36 PM
To: Larryba@...
Subject: Big successes for AvrX!

Dear Larry,

I am the director of Polymorphic Robotics Lab in USC and we have been
using your AvrX for our self-reconfigurable robotic system called
SuperBot since 2005. I want to let you know that your software system
works beautifully for these robots and I personally as a computer
scientist admire your ability to wrote such a compact and functional
system.

SuperBot is a multi-million dollar project sponsored by NASA for space
robots. You can find more information about the project at
http://www.isi.edu/robots
. There are papers, movies, and news clips from BCC, Fox, Discovery,
New York Times, and others. More are coming every month.

Again, thank you very much for your work and it made a big difference
for our distributed control of these robots!

Sincerely yours,

Wei-Min

=================================================================
Wei-Min Shen,  Director of Polymorphic Robotics Lab
Associate Director, USC Center for Robotics and Embedded Systems
Research Associate Professor in Computer Science
Information Sciences Institute, University of Southern California
4676 Admiralty Way, Marina del Rey, CA 90292
Phone: 310-448-8710, Fax 310-822-0751, http://www.isi.edu/robots
==================================================================



No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.423 / Virus Database: 270.14.26/2451 - Release Date: 10/27/09
07:38:00

#1911 From: pankaj.visitme@...
Date: Sat Oct 17, 2009 11:09 am
Subject: Wishes for you and your family on this DIWALI :)
pankaj_visitme
Offline Offline
Send Email Send Email
 
Hi,

Hope you are good.

Wishing you a VERY VERY PROSPEROUS and GREAT TIME and LIFE Ahead on this DIWALI
:)


:-)

Stay Happy...
Keep Smiling...


- Pankaj Agrawal

#1910 From: Dean Hall <dwhall256@...>
Date: Sun Sep 27, 2009 5:47 pm
Subject: Re: Basic AvrX questions
dwhall256
Offline Offline
Send Email Send Email
 
AvrX release 2.6g is available in the group's files section:
http://finance.groups.yahoo.com/group/avrx/files/
You'll find the zip file in the "AvrX" folder.

1 ms could be done by an AvrX thread, but since you have so much other
stuff to do, I would recommend sampling the keys in a hardware timer
interrupt and perform other tasks in an AvrX soft timer.

That said, what kind of "sampling" needs to be done on the keys?
Analog, digital, encoder?

Your tick rate is up to you.  I usually adjust mine to make any math/
timing easier based on the application.  For example, if the MIDI
protocol has a fixed number of key samples per packet; you might want
some even multiple/fraction of that.

One more recommendation: don't go thread happy.  Threads are RAM
hogs.  I've always been better off defining one thread,
running a soft timer (for example with a 50 hz frequency), then in the
code I do modulos to call functions for the other slower tasks (maybe
at 10 and 1 hz).  Doing this avoids thread schedule collisions and has
a *lot* more predictable behavior.  Here's a code sample from my robot
software.  In it you'll see several functions happen at 5Hz and my LCD
UI code at 1 Hz:

/* The 5 Hz Task: sensors, KF, nav, behavior */
AVRX_GCC_TASKDEF(five_hz_task, 128, 4)
{
      TimerControlBlock delay_timer;
      uint8_t one_hz_counter;

      one_hz_counter = 1;

      for (;;)
      {
          AvrXStartTimer(&delay_timer,
                         FIVE_HZ_TASK_PERIOD_MS / AVRX_TIMESLICE_MS);

          sensors_sample();
          motc_periodic();
          kf_step();
          nav_calc_data();

          /* 1 Hz: update lcd with nav data */
          if (--one_hz_counter == 0)
          {
              one_hz_counter = ONE_HZ_MODULO;
              lcdui_update_nav();
          }

          AvrXWaitTimer(&delay_timer);
      }
}


!!Dean


On Sep 27, 2009, at 11:27 , albin.stigo wrote:

> Hi all,
>
> I'm new to avrx but not avr in general... I'm developing an open
> sourced (gpl) midi controller (keyboard). Previously this
> controller's software was running as a state machine but as i keep
> adding features like display and rotary encoders its getting too
> complex and I thought I might try running it on an RTOS, and have
> some basic questions :-)
>
> The keyboard module is velocity sensitive and therefore the keys
> "state" has to be sampled exactly every 1ms... Is this kind of
> timing / sample rate possible? I plan to be running about 4 or 5
> tasks (all of them less time critical). What tick rate should i
> choose? I'm using at atmega128 running at 12Mhz. What would the
> overhead be... how many extra instructions / tick and context switch
> (approximately)?
>
> Where can i find the latest source for avrx, I read somewhere the
> latest sources are posted on this lists but I can't really find any..?
>
> Thanks,
> Albin
>
>
>

#1909 From: Neil Johnson <neil.johnson97@...>
Date: Sun Sep 27, 2009 4:50 pm
Subject: Re: Basic AvrX questions
nej22uk
Offline Offline
Send Email Send Email
 
Hi Albin,

> The keyboard module is velocity sensitive and therefore the keys
> "state" has to be sampled exactly every 1ms... Is this kind of
> timing / sample rate possible? I plan to be running about 4 or 5
> tasks (all of them less time critical). What tick rate should i
> choose? I'm using at atmega128 running at 12Mhz. What would the
> overhead be... how many extra instructions / tick and context
> switch (approximately)?

What I would do (have done) is to keep the keyboard scanning and
velocity timers inside an interrupt handler kicked by a timer running
at 1ms, but move everything else into the RTOS domain.  This keeps
your velocity measuring state machine ticking at a regular rate, so
no funny 'bum' notes.

In my case, a 61-note keyboard scanned at 1ms, with both down and
release velocity measurement, running on a 4MHz ATmega103L during
prototyping.  The target device will be an ATmega8 running at 8, 12
or 15MHz (not decided just yet), and while I don't have display or
rotary encoders I do have four analogue inputs to sample and filter.

Cheers,
Neil
--
http://www.njohnson.co.uk

#1908 From: "albin.stigo" <albin.stigo@...>
Date: Sun Sep 27, 2009 4:27 pm
Subject: Basic AvrX questions
albin.stigo
Offline Offline
Send Email Send Email
 
Hi all,

I'm new to avrx but not avr in general... I'm developing an open sourced (gpl)
midi controller (keyboard). Previously this controller's software was running as
a state machine but as i keep adding features like display and rotary encoders
its getting too complex and I thought I might try running it on an RTOS, and
have some basic questions :-)

The keyboard module is velocity sensitive and therefore the keys "state" has to
be sampled exactly every 1ms... Is this kind of timing / sample rate possible? I
plan to be running about 4 or 5 tasks (all of them less time critical). What
tick rate should i choose? I'm using at atmega128 running at 12Mhz. What would
the overhead be... how many extra instructions / tick and context switch
(approximately)?

Where can i find the latest source for avrx, I read somewhere the latest sources
are posted on this lists but I can't really find any..?

Thanks,
Albin

#1907 From: Adeilton Oliveira <adeiltonjunior@...>
Date: Sun Sep 20, 2009 3:16 pm
Subject: Re: First Babuino Project Robot - Obstacle avoidance (Arduino/LOGO)
acojr961
Offline Offline
Send Email Send Email
 
You are right, Dean. My project does not use AvrX and there's no mention about it in the blog.
I'm not using any operating system in the current version, but I'm trying to develop the new version that includes comm stack for Babuinos to talk to each other based on AvrX. I HOPE i get it working and so AvrX will be referred as necessary.

Adeilton


Dean Hall wrote:
 

Adeilton, does your project use AvrX in any way? I cannot find
mention of AvrX in your blog.

!!Dean

On Sep 19, 2009, at 21:07 , Adeilton Oliveira wrote:

> Hello,
>
> The blog has been updated with some new posts a videos, including the
> first application of Babuino Project, an obstacle avoidance vehicle.
> Here is the link:
>
> http://babuinoproject.blogspot.com/
>
> Please feel free to make your comments!
>
> Adeilton Oliveira
>
>
>
> Adeilton Oliveira wrote:
>> Hello guys,
>>
>> I'll share with you the weekend project I am developing with Arduino
>> board and AVR Studio.
>> This is a Robot dev. plataform. I can program the Arduino in LOGO
>> language using the Cricket Logo, Logo Blocks (it's not working 100%),
>> iCode, and CTI Blocos.
>> Here is the link:
>>
>> http://babuinoproject.blogspot.com/
>>
>> Regards.
>>
>
>
>
>
> ------------------------------------
>
> To unsubscribe send an email to:
> avrx-unsubscribe@yahoogroups.com
>
> Yahoo! Groups Links
>
>
>



#1906 From: Dean Hall <dwhall256@...>
Date: Sun Sep 20, 2009 2:24 pm
Subject: Re: First Babuino Project Robot - Obstacle avoidance (Arduino/LOGO)
dwhall256
Offline Offline
Send Email Send Email
 
Adeilton, does your project use AvrX in any way?  I cannot find
mention of AvrX in your blog.

!!Dean


On Sep 19, 2009, at 21:07 , Adeilton Oliveira wrote:

> Hello,
>
> The blog has been updated with some new posts a videos, including the
> first application of Babuino Project, an obstacle avoidance vehicle.
> Here is the link:
>
> http://babuinoproject.blogspot.com/
>
> Please feel free to make your comments!
>
> Adeilton Oliveira
>
>
>
> Adeilton Oliveira wrote:
>> Hello guys,
>>
>> I'll share with you the weekend project I am developing with Arduino
>> board and AVR Studio.
>> This is a Robot dev. plataform. I can program the Arduino in LOGO
>> language using the Cricket Logo, Logo Blocks (it's not working 100%),
>> iCode, and CTI Blocos.
>> Here is the link:
>>
>> http://babuinoproject.blogspot.com/
>>
>> Regards.
>>
>
>
>
>
> ------------------------------------
>
> To unsubscribe send an email to:
> avrx-unsubscribe@yahoogroups.com
>
> Yahoo! Groups Links
>
>
>

#1905 From: Adeilton Oliveira <adeiltonjunior@...>
Date: Sun Sep 20, 2009 2:07 am
Subject: First Babuino Project Robot - Obstacle avoidance (Arduino/LOGO)
acojr961
Offline Offline
Send Email Send Email
 
Hello,

The blog has been updated with some new posts a videos, including the
first application of Babuino Project, an obstacle avoidance vehicle.
Here is the link:

http://babuinoproject.blogspot.com/

Please feel free to make your comments!

Adeilton Oliveira



Adeilton Oliveira wrote:
> Hello guys,
>
> I'll share with you the weekend project I am developing with Arduino
> board and AVR Studio.
> This is a Robot dev. plataform. I can program the Arduino in LOGO
> language using the Cricket Logo, Logo Blocks (it's not working 100%),
> iCode, and CTI Blocos.
> Here is the link:
>
> http://babuinoproject.blogspot.com/
>
> Regards.
>

#1902 From: "manpandemon" <manpandemon@...>
Date: Mon Sep 7, 2009 2:55 pm
Subject: AvrX Fist experience.
manpandemon
Offline Offline
Send Email Send Email
 
Ïîìîãèòå ðåøèòü ïðîáëåìó ñ çàïóñêîì îäíîãî èç ïðèìåðîâ äèñòðèáóòèâà AvrX2.6f.
Êîìïèëèðóþ ïðîåêò "Timers"? äàëåå çàïóñêàþ â äåáàãåðå (AvrStudio, Proteus), íî
íå ïîëó÷àþ îæèäàåìîãî ðåçóëüòàòà. Ïðîãðàììà îñòàíàâëèâàåòñÿ... Êàê òîëüêî ñòàâëþ
êîìåíòàðèé íà ñòðîêàæ ãäå åñòü AvrXdelay  ...WaitTimers... , ïåððåêîìïèëèðóþ,
ñðàçó âñå ñòàíîâèòüñÿ õîðîøî, ïðîãðàììà íà÷èíàåò ðàáîòàòü, íî åñòåñòâåííî íåò
âðåìåííûõ çàäåæåê ïî òàéìåðàì. Ìîæåò áûòü åñòü êàêèå òî îñîáåííîñòè ?

#1901 From: "larry barello" <yahoo@...>
Date: Tue Jul 28, 2009 12:29 pm
Subject: RE: Fw:RE: AvrX23_2313
lbarello
Offline Offline
Send Email Send Email
 

The 2313 version of AvrX is really old, so the details may be different, but in general initializing the task stuffs the stack with zeros for all registers plus the entry point (much like a call puts the return address on the stack).  The call/jump to epilog then pops all those registers and does a return.  The specific details of how stuff is pushed/popped off the task stack depends upon version and what is being saved.  This is pretty much how any task switcher works which is why context switching (from one task to another) is relatively expensive vs. a regular call & return.  Modern processors with lots of registers (i.e. AVR) take a lot of stack and time to push/pop everything.

 

If I recall correctly, the 2313 version only saves a few registers for the kernel and allows the user to specify  additional registers on a task by task basis.  The 2313 only had 128 bytes of SRAM¡­

 

From: avrx@yahoogroups.com [mailto:avrx@yahoogroups.com] On Behalf Of fresh1357
Sent: Monday, July 27, 2009 11:59 PM
To: avrx
Subject: [avrx] Fw:RE: AvrX23_2313

 




 

Dear   larry:
    I have read  your    AvrX23_2313  carefully.I  have  understand

each  piece  of  kernel,but I  can't  understand  how  it  work  in a
whole.especially I  can't  understand  how  the kernel jump to  the

frist address  of  the  task(process). Can   you   tell  how it work

detail.

    Cheers!

                                                 fresh

 


ÍøÒ×YEAH.NETÃâ·ÑÓÊÏ䣺ÄúµÄÖÕÉíÃâ·ÑÓÊÏä

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.392 / Virus Database: 270.13.25/2256 - Release Date: 07/27/09 05:58:00





ÍøÒ×YEAH.NETÃâ·ÑÓÊÏ䣺ÄúµÄÖÕÉíÃâ·ÑÓÊÏä


No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.392 / Virus Database: 270.13.25/2256 - Release Date: 07/27/09 05:58:00


#1900 From: fresh1357 <fresh1357@...>
Date: Tue Jul 28, 2009 6:59 am
Subject: Fw:RE: AvrX23_2313
fresh13570
Offline Offline
Send Email Send Email
 
 

Dear   larry:
    I have read  your    AvrX23_2313  carefully.I  have  understand

each  piece  of  kernel,but I  can't  understand  how  it  work  in a
whole.especially I  can't  understand  how  the kernel jump to  the

frist address  of  the  task(process). Can   you   tell  how it work

detail.

    Cheers!

                                                 fresh

 


ÍøÒ×YEAH.NETÃâ·ÑÓÊÏ䣺ÄúµÄÖÕÉíÃâ·ÑÓÊÏä

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.392 / Virus Database: 270.13.25/2256 - Release Date: 07/27/09 05:58:00




ÍøÒ×YEAH.NETÃâ·ÑÓÊÏ䣺ÄúµÄÖÕÉíÃâ·ÑÓÊÏä

#1899 From: "John Lin" <0chiehchen@...>
Date: Fri Jun 12, 2009 9:26 am
Subject: Re: Assembly problem
chiehchen
Offline Offline
Send Email Send Email
 
Thanks for your tips.  I am using ATmega644P and got the same problem.  However,
your fix seems to require _AVR_IOMX8_H_, which I do not have.  I use the
following method:

For avrx_generatesinglestepinterrupt.S:
The original code segment:
GenerateInterrupt:
#ifdef CS0
#    define CS00 CS0 /* Cover mega128 fubar with changed bit names */
#endif

Added this after that:
#ifdef TCCR0B
#    define TCCR0 TCCR0B /* Cover register change for atmega48/88/168  and
ATmega164P/324P/644P */
#endif


For avrx_eeprom.S:
#include        "avrx.inc"

#ifdef EEPE
# define EEWE EEPE /* Cover register change for atmega48/88/168 and
ATmega164P/324P/644P */
# define EEMWE EEMPE /* Write enable and master write enable */
#endif


This might work better...

- john


--- In avrx@yahoogroups.com, "j_s_connell" <j_s_connell@...> wrote:
>
> Fixed my problem, looks like register naming problem (maybe i have an
> older version of avrx).
>
> To fix added following to avrx_generatesinglestepinterrupt.S:
> after #include "avrx.inc" :
>
> #ifdef _AVR_IOMX8_H_
> #  define TCCR0 TCCR0B /* Cover register change for
> atmega48/88/168 */
> #endif
>
> also had to fix avrx_eeprom.S
> after #include "avrx.inc" :
> #ifdef _AVR_IOMX8_H_
> #  define EEWE EEPE 	 /* Cover register change for
> atmega48/88/168 */
> #  define EEMWE EEMPE     /* Write enable and master write
> enable */
> #endif
>
> Now all libraries compile fine!
>
> If this was obvious or i have incorrect avrx files, i apologize.
>
>
> --- In avrx@yahoogroups.com, "j_s_connell" <j_s_connell@> wrote:
> >
> > When compiling for the atmega168 I get this error:
> >
> > if I change the target it assembles fine..
> >
> > what am I missing? (using 2.6f)
> >
> > Assembling: avrx_generatesinglestepinterrupt.S
> > avr-gcc -c -mmcu=atmega168 -I. -x assembler-with-cpp -Wa,-adh
> > lns=avrx_generatesinglestepinterrupt.lst,-gstabs
> > avrx_generatesinglestepinterrup
> > t.S -o avrx_generatesinglestepinterrupt.o
> > avrx_generatesinglestepinterrupt.S: Assembler messages:
> > avrx_generatesinglestepinterrupt.S:39: Error: constant value
> required
> > avrx_generatesinglestepinterrupt.S:39: Error: number must be less
> > than 64
> > avrx_generatesinglestepinterrupt.S:42: Error: constant value
> required
> > avrx_generatesinglestepinterrupt.S:42: Error: number must be less
> > than 64
> > avrx_generatesinglestepinterrupt.S:43: Error: constant value
> required
> > avrx_generatesinglestepinterrupt.S:43: Error: number must be less
> > than 64
> > make: *** [avrx_generatesinglestepinterrupt.o] Error 1
> >
>

#1898 From: gusimon <zm_gu@...>
Date: Mon May 25, 2009 7:36 am
Subject: RE: Re: AVRx on Arduino
zm_gu
Offline Offline
Send Email Send Email
 
Cool, you hit the great point.
After remove avrx.inc and rename avrx.a to libavrx.a to adapter AVR Studio and WinAvr constraint, it works fine now.
Great thanks!
 
Regards,
Simon
 

To: avrx@yahoogroups.com
From: tomdean1939@...
Date: Sun, 24 May 2009 04:42:36 +0000
Subject: [avrx] Re: AVRx on Arduino



--- In avrx@yahoogroups.com, gusimon <zm_gu@...> wrote:

> avr-gcc.exe -I"E:\AVRX\iMP3\..\RTOS\AvrX2.6g\avrx" -mmcu=atmega16 -Wall -gdwarf-2 -std=gnu99 -DF_CPU=8000000UL -O2 -funsigned-char -funsigned-bitfields -fshort-enums -MD -MP -MT Task_Def.o -MF dep/Task_Def.o.d -c ../Task/Task
> _Def.c
>
> In file included from ../Task/Task_Def.c:19:
> ../Task/../avrx.inc:302: error: expected identifier or '(' before '.' token
> ../Task/../avrx.inc:327: error: expected identifier or '(' before '.' token
> In file included from ../Task/Task_Def.c:20:
> ../Task/../avrx.h:113: error: expected identifier or '(' before numeric constant
> ../Task/../avrx.h:114: error: expected ';' before 'unsigned'
> ../Task/../avrx.h:125: error: expected identifier or '(' before numeric constant
> ../Task/../avrx.h:126: error: expected ';' before 'struct'
> ../Task/../avrx.h:171: error: expected identifier or '(' before numeric constant
> ../Task/../avrx.h:172: error: expected ';' before 'Mutex'
> ../Task/../avrx.h:206: error: expected identifier or '(' before numeric constant
> ../Task/../avrx.h:207: error: expected ';' before 'Mutex'
> ../Task/../avrx.h:374: error: expected identifier or '(' before numeric constant
> make: *** [Task_Def.o] Error 1

Looks like you are including avrx.inc and avrx.h in Task_Def.c. Should you only include avrx.h?




Á¢¿ÌÏÂÔØ MSN ±£»¤¶Ü£¬±£ÕÏMessenger °²È«Îȶ¨£¡ ÏÖÔÚ¾ÍÏÂÔØ£¡

#1897 From: "tomdean1939" <tomdean1939@...>
Date: Sun May 24, 2009 4:42 am
Subject: Re: AVRx on Arduino
tomdean1939
Offline Offline
Send Email Send Email
 
--- In avrx@yahoogroups.com, gusimon <zm_gu@...> wrote:

> avr-gcc.exe -I"E:\AVRX\iMP3\..\RTOS\AvrX2.6g\avrx"  -mmcu=atmega16 -Wall
-gdwarf-2 -std=gnu99                             -DF_CPU=8000000UL -O2
-funsigned-char -funsigned-bitfields -fshort-enums -MD -MP -MT Task_Def.o -MF
dep/Task_Def.o.d  -c  ../Task/Task
> _Def.c
>
> In file included from ../Task/Task_Def.c:19:
> ../Task/../avrx.inc:302: error: expected identifier or '(' before '.' token
> ../Task/../avrx.inc:327: error: expected identifier or '(' before '.' token
> In file included from ../Task/Task_Def.c:20:
> ../Task/../avrx.h:113: error: expected identifier or '(' before numeric
constant
> ../Task/../avrx.h:114: error: expected ';' before 'unsigned'
> ../Task/../avrx.h:125: error: expected identifier or '(' before numeric
constant
> ../Task/../avrx.h:126: error: expected ';' before 'struct'
> ../Task/../avrx.h:171: error: expected identifier or '(' before numeric
constant
> ../Task/../avrx.h:172: error: expected ';' before 'Mutex'
> ../Task/../avrx.h:206: error: expected identifier or '(' before numeric
constant
> ../Task/../avrx.h:207: error: expected ';' before 'Mutex'
> ../Task/../avrx.h:374: error: expected identifier or '(' before numeric
constant
> make: *** [Task_Def.o] Error 1

Looks like you are including avrx.inc and avrx.h in Task_Def.c.  Should you only
include avrx.h?

#1896 From: gusimon <zm_gu@...>
Date: Sat May 23, 2009 7:06 am
Subject: RE: Re: AVRx on Arduino
zm_gu
Offline Offline
Send Email Send Email
 
Hi,
   I tried to run AVRX 2.6f and 2.6g on AT Mega16, the platform is AVR Studio 4.13 and WinAvr 20090313, but the compile error always exist as below, it seems MACRO and ENDM is not recognized by compiler or any other issue.
   I already change the avrx.a to libavrx.a, and copy avrx.h and avrx.inc to source directory.
   Anyone can helps or direct me to the correct person for help?
   Thanks in advance!
 
Regards,
Simon
 
avr-gcc.exe -I"E:\AVRX\iMP3\..\RTOS\AvrX2.6g\avrx"  -mmcu=atmega16 -Wall -gdwarf-2 -std=gnu99                             -DF_CPU=8000000UL -O2 -funsigned-char -funsigned-bitfields -fshort-enums -MD -MP -MT Task_Def.o -MF dep/Task_Def.o.d  -c  ../Task/Task
_Def.c
In file included from ../Task/Task_Def.c:19:
../Task/../avrx.inc:302: error: expected identifier or '(' before '.' token
../Task/../avrx.inc:327: error: expected identifier or '(' before '.' token
In file included from ../Task/Task_Def.c:20:
../Task/../avrx.h:113: error: expected identifier or '(' before numeric constant
../Task/../avrx.h:114: error: expected ';' before 'unsigned'
../Task/../avrx.h:125: error: expected identifier or '(' before numeric constant
../Task/../avrx.h:126: error: expected ';' before 'struct'
../Task/../avrx.h:171: error: expected identifier or '(' before numeric constant
../Task/../avrx.h:172: error: expected ';' before 'Mutex'
../Task/../avrx.h:206: error: expected identifier or '(' before numeric constant
../Task/../avrx.h:207: error: expected ';' before 'Mutex'
../Task/../avrx.h:374: error: expected identifier or '(' before numeric constant
make: *** [Task_Def.o] Error 1

 

 

To: avrx@yahoogroups.com
From: Brewskister@...
Date: Thu, 14 May 2009 05:00:38 +0000
Subject: [avrx] Re: AVRx on Arduino



Like I said...

Atmel, the micro Arduino is using, manufactures a large range of chips form 8 pin up to over 100 pin. Somewhere in there their is most likely a micro that will do the job for me. The problem is Arduino limits themselves to less than a handfull.

Say for a project you want to use one 8-pin port to read a keypad, one 8-pin port to control an LCD character display and two pins on a third port to control a remote device via the RS-232 pins. I have used an 8515 to do just that. That was about 7 years ago. It has never failed and is still working today. As far as I know Arduino has nothing that has 3 8-pin ports on it.

Sure, I could have done that multiplexing the use of the ports but having specific ports to do specific things, no timesharing, made life easier for my first commercial project.

Mike

--- In avrx@yahoogroups.com, "Swaby, Jonathan F" <jonathan.swaby@...> wrote:
>
> There is an Arduino that is based on some variant of the ATmega128. It is fairly new and is only supported by the newer releases of the Arduino software. I think SparkFun and others have it.
> https://www.sparkfun.com/commerce/product_info.php?products_id=9152
>
> It looks as if it is being called the Arduino Mega. Well, at least by SparkFun.
>
> Nuts and Volts or Servo have had a few articles on programming the Arduino. The last article went over using WinAVR to program it.
>
> ----- "brewski922" <Brewskister@...> wrote:
> >
> >
> >
> >
> >
> >
>
> I have been tinkering around with AVRs for about 8 years. The reason I ask is about a month or two ago I purchased the Arduino Duemilanove. It has the ATmega328. Started looking around, found out that is about all they support. If I needed a smaller, more cost effective, or bigger, because I needed more computing power, I'm out of luck. I didn't want to get tied down to such a limited setup.
> > Mike
> >
> > --- In avrx@yahoogroups.com , "brewski922" <Brewskister@> wrote:
> > >
> > > Tony,
> > >
> > > From what I understand the only AVR devices Arduino supports are ATmega168 and ATmega328. What other AVR divices does Arduino support?
> > >
> > > Mike
> > >
> >
> >
> >
>
> --
> Jonathan Swaby
> IT Program Manager - Student Affairs
> 404-894-5889
> Georgia Institute of Technology
>




Á¢¼´ÊÔÊÔ΢ÈíµØÍ¼Ð¹¦ÄÜ£¬msn»¥¶¯ä¯ÀÀ£¡ Á¢¿ÌÌåÑ飡

#1895 From: "brewski922" <Brewskister@...>
Date: Thu May 14, 2009 5:00 am
Subject: Re: AVRx on Arduino
brewski922
Offline Offline
Send Email Send Email
 
Like I said...

Atmel, the micro Arduino is using, manufactures a large range of chips form 8
pin up to over 100 pin. Somewhere in there their is most likely a micro that
will do the job for me. The problem is Arduino limits themselves to less than a
handfull.

Say for a project you want to use one 8-pin port to read a keypad, one 8-pin
port to control an LCD character display and two pins on a third port to control
a remote device via the RS-232 pins. I have used an 8515 to do just that. That
was about 7 years ago. It has never failed and is still working today. As far as
I know Arduino has nothing that has 3 8-pin ports on it.

Sure, I could have done that multiplexing the use of the ports but having
specific ports to do specific things, no timesharing, made life easier for my
first commercial project.

Mike

--- In avrx@yahoogroups.com, "Swaby, Jonathan F" <jonathan.swaby@...> wrote:
>
> There is an Arduino that is based on some variant of the ATmega128. It is
fairly new and is only supported by the newer releases of the Arduino software.
I think SparkFun and others have it.
> https://www.sparkfun.com/commerce/product_info.php?products_id=9152
>
> It looks as if it is being called the Arduino Mega. Well, at least by
SparkFun.
>
> Nuts and Volts or Servo have had a few articles on programming the Arduino.
The last article went over using WinAVR to program it.
>
> ----- "brewski922" <Brewskister@...> wrote:
> >
> >
> >
> >
> >
> >
>
> I have been tinkering around with AVRs for about 8 years. The reason I ask is
about a month or two ago I purchased the Arduino Duemilanove. It has the
ATmega328. Started looking around, found out that is about all they support. If
I needed a smaller, more cost effective, or bigger, because I needed more
computing power, I'm out of luck. I didn't want to get tied down to such a
limited setup.
> > Mike
> >
> > --- In avrx@yahoogroups.com , "brewski922" <Brewskister@> wrote:
> > >
> > > Tony,
> > >
> > > From what I understand the only AVR devices Arduino supports are ATmega168
and ATmega328. What other AVR divices does Arduino support?
> > >
> > > Mike
> > >
> >
> >
> >
>
> --
> Jonathan Swaby
> IT Program Manager - Student Affairs
> 404-894-5889
> Georgia Institute of Technology
>

#1894 From: "Swaby, Jonathan F" <jonathan.swaby@...>
Date: Wed May 13, 2009 8:02 pm
Subject: Re: Re: AVRx on Arduino
jfs10psuedu
Offline Offline
Send Email Send Email
 
There is an Arduino that is based on some variant of the ATmega128. It is fairly new and is only supported by the newer releases of the Arduino software. I think SparkFun and others have it.
https://www.sparkfun.com/commerce/product_info.php?products_id=9152

It looks as if it is being called the Arduino Mega. Well, at least by SparkFun.

Nuts and Volts or Servo have had a few articles on programming the Arduino. The last article went over using WinAVR to program it.

----- "brewski922" <Brewskister@...> wrote:
>
>

I have been tinkering around with AVRs for about 8 years. The reason I ask is about a month or two ago I purchased the Arduino Duemilanove. It has the ATmega328. Started looking around, found out that is about all they support. If I needed a smaller, more cost effective, or bigger, because I needed more computing power, I'm out of luck. I didn't want to get tied down to such a limited setup.
> Mike
>
> --- In avrx@yahoogroups.com, "brewski922" <Brewskister@...> wrote:
> >
> > Tony,
> >
> > From what I understand the only AVR devices Arduino supports are ATmega168 and ATmega328. What other AVR divices does Arduino support?
> >
> > Mike
> >
>
>



--
Jonathan Swaby
IT Program Manager - Student Affairs
404-894-5889
Georgia Institute of Technology


#1893 From: "brewski922" <Brewskister@...>
Date: Wed May 13, 2009 7:48 pm
Subject: Re: AVRx on Arduino
brewski922
Offline Offline
Send Email Send Email
 
I have been tinkering around with AVRs for about 8 years. The reason I ask is
about a month or two ago I purchased the Arduino Duemilanove. It has the
ATmega328. Started looking around, found out that is about all they support. If
I needed a smaller, more cost effective, or bigger, because I needed more
computing power, I'm out of luck. I didn't want to get tied down to such a
limited setup.
Mike


--- In avrx@yahoogroups.com, "brewski922" <Brewskister@...> wrote:
>
> Tony,
>
> From what I understand the only AVR devices Arduino supports are ATmega168 and
ATmega328. What other AVR divices does Arduino support?
>
> Mike
>

#1892 From: "Tony Richardson" <am_richardson@...>
Date: Wed May 13, 2009 6:38 pm
Subject: Re: AVRx on Arduino
arichardson54
Offline Offline
Send Email Send Email
 
Mike,
I believe that is all.  I did not mean to imply that the
Arduino board could be used for general Atmel development.

Tony

--- In avrx@yahoogroups.com, "brewski922" <Brewskister@...> wrote:
>
> Tony,
>
> From what I understand the only AVR devices Arduino supports are ATmega168 and
ATmega328. What other AVR divices does Arduino support?
>
> Mike
>

#1891 From: "brewski922" <Brewskister@...>
Date: Wed May 13, 2009 4:32 pm
Subject: Re: AVRx on Arduino
brewski922
Offline Offline
Send Email Send Email
 
Tony,

From what I understand the only AVR devices Arduino supports are ATmega168 and
ATmega328. What other AVR divices does Arduino support?

Mike

#1890 From: "Tony Richardson" <am_richardson@...>
Date: Wed May 13, 2009 3:39 pm
Subject: Re: AVRx on Arduino
arichardson54
Offline Offline
Send Email Send Email
 
Arduino is a programming language, but it is also a
microcontroller board.  I think it makes a very nice,
very inexpensive ATmega168 development kit.  You
can completely bypass the Arduino development environment
and write code for the hardware using avr-gcc directly.
(I use WinAVR.)  You can transfer programs to the
Arduino board using avrdude.

I think the original poster is asking if AvrX will run
on the ATmega168.  I haven't tried this, but searching
this forum indicates that others have.  I am not sure
that anyone has been successful.

Many of the newer Arduino boards use the ATmega328
which has twice the memory (flash, eeprom, and ram)
of the ATmega168 and so should make porting AvrX easier
(feasible?). You could also buy an ATmega328 to replace
the 168 on an older Arduino board.
The ATmega328 is supported by the latest releases
of the Arduino language, so you can still use the board
for Arduino programming too.  If you buy a 328 to replace
the 168 on an older board, you will need a programmer
to program the Arduino boot-loader onto the ATmega328
or you will need to buy one with the Arduino boot
loader preloaded.  A google search of "arduino atmega328"
will uncover sites that sell 328s with the Arduino
boot-loader preprogrammed.

Tony Richardson

--- In avrx@yahoogroups.com, Shane Bolton <shane@...> wrote:
>
> Think about what you are wishing for.
>
> Arduino is its own 'C' like environment but does not support
> multitasking.
>
> AVRX is another runtime environment that supports multitasking.
>
> You can't have both.
>
>
> Regards,
>
> Shane Bolton
> shane@...
>
>
>
>
>
> On 17/04/2009, at 7:31 PM, pino_otto wrote:
>
> >
> >
> > I would like to know whether somebody has ported the AVRx to Arduino.
> >
> > I would like to use AVRx on Arduino. Is there any information (how-
> > to) available?
> >
> > Best regards,
> > giovanni
> >
> >
> >
>

#1889 From: "piratman2000" <piratman2000@...>
Date: Sun Apr 19, 2009 1:44 pm
Subject: AVRX - WinAVR
piratman2000
Offline Offline
Send Email Send Email
 
Can someone explain how I do so AVRX to work with WinAVR 20090313 in AVR studio
4.16?

Best regards
Leif

#1888 From: Shane Bolton <shane@...>
Date: Fri Apr 17, 2009 10:56 pm
Subject: Re: AVRx on Arduino
shane_bolton
Offline Offline
Send Email Send Email
 
Think about what you are wishing for.

Arduino is its own 'C' like environment but does not support multitasking.

AVRX is another runtime environment that supports multitasking.

You can't have both.


Regards,

Shane Bolton





On 17/04/2009, at 7:31 PM, pino_otto wrote:



I would like to know whether somebody has ported the AVRx to Arduino.

I would like to use AVRx on Arduino. Is there any information (how-to) available?

Best regards,
giovanni



#1887 From: "pino_otto" <pino_otto@...>
Date: Fri Apr 17, 2009 9:31 am
Subject: AVRx on Arduino
pino_otto
Offline Offline
Send Email Send Email
 
I would like to know whether somebody has ported the AVRx to Arduino.

I would like to use AVRx on Arduino. Is there any information (how-to)
available?

Best regards,
giovanni

#1886 From: "Christopher X. Candreva" <chris@...>
Date: Wed Feb 25, 2009 1:19 am
Subject: ISR type routine for Vex remote ?
ccandreva
Offline Offline
Send Email Send Email
 
I'm sure most of you have seen the Vex 6-channel remote sets that have been
on the surplus sites for a while now. MPJA just closed theirs out for $10
each and I finally couldn't resist.

(If you haven't -
http://www.allelectronics.com/make-a-store/item/JS-6/6-CHANNEL-TRANSMITTER-AND-R\
ECEIVER/-/1.html
)

I was wondering if someone had made an ISR type routine to read the output,
possibly just make the chanels available as global variables.  Ideally I
would like to be able to just read the current remote state from AvrX tasks,
like we do encoder values.


==========================================================
Chris Candreva  -- chris@... -- (914) 948-3162
WestNet Internet Services of Westchester
http://www.westnet.com/

#1885 From: "larry barello" <yahoo@...>
Date: Sat Feb 14, 2009 5:46 pm
Subject: RE: Question about AvrXWaitMessage
lbarello
Offline Offline
Send Email Send Email
 

Waits are on a semaphore buried in the object (message, timer, whatnot).  Consumers wait on the semaphore in the queue head, Producers wait on the (ACK) semaphore buried in the message.   The only time a consumer would wait one or more messages is if there are other consumers ahead of it in the queue.

 

I can’t honestly think of a reason to have more than one consumer, but it sort of fell out of the basic semaphore/tasking logic to allow multiple.

 

So if there are no consumers, messages queue up on the head.  As a consumer “waits” it just pulls the next message off.  If there are no more messages, the consumer blocks on the queue semaphore.  If there are more than one consumer (?) waiting, they just queue up on that same semaphore FIFO.

 

From: Brian Cuthie <brian@...>

Date: February 14, 2009 9:26:44 AM EST

Subject: Question about AvrXWaitMessage

 


Hi Larry,

A quick question about AvrXWaitMessage(). Looking at the source, unless I'm misunderstanding something, it appears that AvrXWaitMessage() only returns once it has processed all messages in the queue. Is that right?

Thanks

-brian


 


#1884 From: "larry barello" <yahoo@...>
Date: Thu Feb 12, 2009 5:59 am
Subject: RE: Re: Problems with MessageQueue
lbarello
Offline Offline
Send Email Send Email
 
Acks apply to the element pulled off the queue.  Queues are FIFO.

-----Original Message-----
From: avrx@yahoogroups.com [mailto:avrx@yahoogroups.com] On Behalf Of
tord.lindner
Sent: Wednesday, February 11, 2009 12:34 PM
To: avrx@yahoogroups.com
Subject: [avrx] Re: Problems with MessageQueue

Good point, I thought since it's a queue, FIFO, that the first message
would be done first and the ack would correspond to that first message
and so on. A good workaround is to use different queues.

cheers, tord


--- In avrx@yahoogroups.com, "Steven Holder" <s.holder123@...> wrote:
>
> Perhaps an intermediate step would be to define a rx_queue for each
uart, it
> seems that the first ackmessage is getting confused and is sending
to the
> wrong mcb
>
> And is therefore not getting reset, in essence you are waiting on one
> message, but ack ing to another, once the first message is received
then the
> next, the context for rx_queue is not switching.
>
>
>
> Try 2 rx_queues with a task for each mcb. See if that helps.
>
>
>
> I assume that the uart is a byte transfer and another tasks deals
with this
> data.
>
>
>
> Regards
>
>
>
>
>
>   _____
>
> From: avrx@yahoogroups.com [mailto:avrx@yahoogroups.com] On Behalf Of
> tord.lindner
> Sent: 11 February 2009 18:14
> To: avrx@yahoogroups.com
> Subject: [avrx] Re: Problems with MessageQueue
>
>
>
> I want to have four 4800 SW-uarts (need the other two as well on the
> mega128). My idea was to have a bit sampler which goes on 50uS ticks
> and every 1mS do a AvrXTimer. One of the four EXT irq kicks it all off:
>
> SIGNAL(SIG_INTERRUPT4) {
> if (! Uart4_State) { // we are in wait for start bit mode
> if (! (PINE & (1 << PE4))) { // this is good, a low start bit
> Uart4_Sample = BYTESAMPLE;// ok, lets start
> Uart4_State++;
> }
> } else if (Uart4_State < 10) { // for all data bytes
> Uart4_Data[Uart4_State ] = PINE & (1 << PE4);
> Uart4_Data[Uart4_State++ + 10] = Uart4_Sample;
> } else Uart4_State = 0; // start all over again
> }
>
> Everything works if I only use one message send to the queue, but if I
> send off two messages to the same queue once, then the very simple
> receiver gets out from AvrXWaitMessage even though nothing has been
> sent more to the message box. It just loops same rate as SIG_OVERFLOW0
> (50Us), guess the epilog at the end, but since no message is available
> it should not return, but it does. Again, only sending one message I
> see that the receiver runs every 2mS (as it should).
>
> Since there is a AvrXIntSendMessage I thought it was possible to send
> a message to a queue from a ISR. Maybe it is limited to only one
message?
>
> thanks for your answers!
>
> cheers,tord
>
> --- In avrx@yahoogroups. <mailto:avrx%40yahoogroups.com> com, Dean Hall
> <dwhall256@> wrote:
> >
> > Well, it's hard to say exactly what's going on because you haven't
> > included all the code. For example, I don't see where Uart4_Sample
> > and Uart5_Sample are set to non-zero values; and what are the values
> > of Uart4_State and Uart5_State?
> >
> > !!Dean
> >
> > > I want a quick running ISR sample bits and send it to a process
> > > waiting for it, the ISP shall at the most send four different
messages
> > > in one loop to the same receiver.
> > >
> > > ///////////////////////////////////////////////
> > > AVRX_GCC_TASKDEF(taskReceiver, RECEIVER_MEM, RECEIVER_PRIO) {
> > > MessageControlBlock * msg;
> > >
> > > for (;;) {
> > > msg = AvrXWaitMessage(& Receive_Queue);
> > > AvrXAckMessage(msg);
> > > PORTG ^= (1 << PG3); // just to see what's happening
> > > }
> > > }
> > > /////////////////////////////////////////////
> > > AVRX_SIGINT(SIG_OVERFLOW0) {
> > > IntProlog();
> > > TCNT0 = TIMERTICK;
> > > if (Uart4_Sample) Uart4_Sample--;
> > > else if (Uart4_State) {
> > > if (AvrXTestMessageAck(& Uart4_Message.mcb) == SEM_DONE) {
> > > AvrXIntSendMessage(& Receive_Queue, & Uart4_Message.mcb);
> > > }
> > > }
> > > if (Uart5_Sample) Uart5_Sample--;
> > > else if (Uart5_State) {
> > > if (AvrXTestMessageAck(& Uart5_Message.mcb) == SEM_DONE) {
> > > AvrXIntSendMessage(& Receive_Queue, & Uart5_Message.mcb);
> > > }
> > > }
> > > if (! timerHandler--) { // only every 1mS
> > > AvrXTimerHandler(); // Call Time queue manager
> > > timerHandler = MILLISEC;
> > > }
> > > Epilog(); // Return to tasks
> > > }
> > >
> > > Queues are primed and it all works well with only one sender. If I
> > > enable both senders (Uart4&Uart5) I can see the receiver process
> > > looping all the time (LED toogles) even though each only two
messages
> > > have been sent.
> > >
> > > Have I missed something, is it not possible to have several messages
> > > queued into one process handling it?
> > >
> > > Cheers, tord
> > >
> > >
> > >
> >
>




------------------------------------

To unsubscribe send an email to:
avrx-unsubscribe@yahoogroups.com

Yahoo! Groups Links

#1883 From: "tord.lindner" <tord.lindner@...>
Date: Wed Feb 11, 2009 8:34 pm
Subject: Re: Problems with MessageQueue
tord.lindner
Offline Offline
Send Email Send Email
 
Good point, I thought since it's a queue, FIFO, that the first message
would be done first and the ack would correspond to that first message
and so on. A good workaround is to use different queues.

cheers, tord


--- In avrx@yahoogroups.com, "Steven Holder" <s.holder123@...> wrote:
>
> Perhaps an intermediate step would be to define a rx_queue for each
uart, it
> seems that the first ackmessage is getting confused and is sending
to the
> wrong mcb
>
> And is therefore not getting reset, in essence you are waiting on one
> message, but ack ing to another, once the first message is received
then the
> next, the context for rx_queue is not switching.
>
>
>
> Try 2 rx_queues with a task for each mcb. See if that helps.
>
>
>
> I assume that the uart is a byte transfer and another tasks deals
with this
> data.
>
>
>
> Regards
>
>
>
>
>
>   _____
>
> From: avrx@yahoogroups.com [mailto:avrx@yahoogroups.com] On Behalf Of
> tord.lindner
> Sent: 11 February 2009 18:14
> To: avrx@yahoogroups.com
> Subject: [avrx] Re: Problems with MessageQueue
>
>
>
> I want to have four 4800 SW-uarts (need the other two as well on the
> mega128). My idea was to have a bit sampler which goes on 50uS ticks
> and every 1mS do a AvrXTimer. One of the four EXT irq kicks it all off:
>
> SIGNAL(SIG_INTERRUPT4) {
> if (! Uart4_State) { // we are in wait for start bit mode
> if (! (PINE & (1 << PE4))) { // this is good, a low start bit
> Uart4_Sample = BYTESAMPLE;// ok, lets start
> Uart4_State++;
> }
> } else if (Uart4_State < 10) { // for all data bytes
> Uart4_Data[Uart4_State ] = PINE & (1 << PE4);
> Uart4_Data[Uart4_State++ + 10] = Uart4_Sample;
> } else Uart4_State = 0; // start all over again
> }
>
> Everything works if I only use one message send to the queue, but if I
> send off two messages to the same queue once, then the very simple
> receiver gets out from AvrXWaitMessage even though nothing has been
> sent more to the message box. It just loops same rate as SIG_OVERFLOW0
> (50Us), guess the epilog at the end, but since no message is available
> it should not return, but it does. Again, only sending one message I
> see that the receiver runs every 2mS (as it should).
>
> Since there is a AvrXIntSendMessage I thought it was possible to send
> a message to a queue from a ISR. Maybe it is limited to only one
message?
>
> thanks for your answers!
>
> cheers,tord
>
> --- In avrx@yahoogroups. <mailto:avrx%40yahoogroups.com> com, Dean Hall
> <dwhall256@> wrote:
> >
> > Well, it's hard to say exactly what's going on because you haven't
> > included all the code. For example, I don't see where Uart4_Sample
> > and Uart5_Sample are set to non-zero values; and what are the values
> > of Uart4_State and Uart5_State?
> >
> > !!Dean
> >
> > > I want a quick running ISR sample bits and send it to a process
> > > waiting for it, the ISP shall at the most send four different
messages
> > > in one loop to the same receiver.
> > >
> > > ///////////////////////////////////////////////
> > > AVRX_GCC_TASKDEF(taskReceiver, RECEIVER_MEM, RECEIVER_PRIO) {
> > > MessageControlBlock * msg;
> > >
> > > for (;;) {
> > > msg = AvrXWaitMessage(& Receive_Queue);
> > > AvrXAckMessage(msg);
> > > PORTG ^= (1 << PG3); // just to see what's happening
> > > }
> > > }
> > > /////////////////////////////////////////////
> > > AVRX_SIGINT(SIG_OVERFLOW0) {
> > > IntProlog();
> > > TCNT0 = TIMERTICK;
> > > if (Uart4_Sample) Uart4_Sample--;
> > > else if (Uart4_State) {
> > > if (AvrXTestMessageAck(& Uart4_Message.mcb) == SEM_DONE) {
> > > AvrXIntSendMessage(& Receive_Queue, & Uart4_Message.mcb);
> > > }
> > > }
> > > if (Uart5_Sample) Uart5_Sample--;
> > > else if (Uart5_State) {
> > > if (AvrXTestMessageAck(& Uart5_Message.mcb) == SEM_DONE) {
> > > AvrXIntSendMessage(& Receive_Queue, & Uart5_Message.mcb);
> > > }
> > > }
> > > if (! timerHandler--) { // only every 1mS
> > > AvrXTimerHandler(); // Call Time queue manager
> > > timerHandler = MILLISEC;
> > > }
> > > Epilog(); // Return to tasks
> > > }
> > >
> > > Queues are primed and it all works well with only one sender. If I
> > > enable both senders (Uart4&Uart5) I can see the receiver process
> > > looping all the time (LED toogles) even though each only two
messages
> > > have been sent.
> > >
> > > Have I missed something, is it not possible to have several messages
> > > queued into one process handling it?
> > >
> > > Cheers, tord
> > >
> > >
> > >
> >
>

#1882 From: "Steven Holder" <s.holder123@...>
Date: Wed Feb 11, 2009 8:16 pm
Subject: RE: Re: Problems with MessageQueue
steven724930
Offline Offline
Send Email Send Email
 

Perhaps an intermediate step would be to define a rx_queue for each uart, it seems that the first ackmessage is getting confused and is sending to the wrong mcb

And is therefore not getting reset, in essence you are waiting on one message, but ack ing to another, once the first message is received then the next, the context for rx_queue is not switching.

 

Try 2 rx_queues with a task for each mcb. See if that helps.

 

I assume that the uart is a byte transfer and another tasks deals with this data.

 

Regards

 

 


From: avrx@yahoogroups.com [mailto:avrx@yahoogroups.com] On Behalf Of tord.lindner
Sent: 11 February 2009 18:14
To: avrx@yahoogroups.com
Subject: [avrx] Re: Problems with MessageQueue

 

I want to have four 4800 SW-uarts (need the other two as well on the
mega128). My idea was to have a bit sampler which goes on 50uS ticks
and every 1mS do a AvrXTimer. One of the four EXT irq kicks it all off:

SIGNAL(SIG_INTERRUPT4) {
if (! Uart4_State) { // we are in wait for start bit mode
if (! (PINE & (1 << PE4))) { // this is good, a low start bit
Uart4_Sample = BYTESAMPLE;// ok, lets start
Uart4_State++;
}
} else if (Uart4_State < 10) { // for all data bytes
Uart4_Data[Uart4_State ] = PINE & (1 << PE4);
Uart4_Data[Uart4_State++ + 10] = Uart4_Sample;
} else Uart4_State = 0; // start all over again
}

Everything works if I only use one message send to the queue, but if I
send off two messages to the same queue once, then the very simple
receiver gets out from AvrXWaitMessage even though nothing has been
sent more to the message box. It just loops same rate as SIG_OVERFLOW0
(50Us), guess the epilog at the end, but since no message is available
it should not return, but it does. Again, only sending one message I
see that the receiver runs every 2mS (as it should).

Since there is a AvrXIntSendMessage I thought it was possible to send
a message to a queue from a ISR. Maybe it is limited to only one message?

thanks for your answers!

cheers,tord

--- In avrx@yahoogroups.com, Dean Hall <dwhall256@...> wrote:
>
> Well, it's hard to say exactly what's going on because you haven't
> included all the code. For example, I don't see where Uart4_Sample
> and Uart5_Sample are set to non-zero values; and what are the values
> of Uart4_State and Uart5_State?
>
> !!Dean
>
> > I want a quick running ISR sample bits and send it to a process
> > waiting for it, the ISP shall at the most send four different messages
> > in one loop to the same receiver.
> >
> > ///////////////////////////////////////////////
> > AVRX_GCC_TASKDEF(taskReceiver, RECEIVER_MEM, RECEIVER_PRIO) {
> > MessageControlBlock * msg;
> >
> > for (;;) {
> > msg = AvrXWaitMessage(& Receive_Queue);
> > AvrXAckMessage(msg);
> > PORTG ^= (1 << PG3); // just to see what's happening
> > }
> > }
> > /////////////////////////////////////////////
> > AVRX_SIGINT(SIG_OVERFLOW0) {
> > IntProlog();
> > TCNT0 = TIMERTICK;
> > if (Uart4_Sample) Uart4_Sample--;
> > else if (Uart4_State) {
> > if (AvrXTestMessageAck(& Uart4_Message.mcb) == SEM_DONE) {
> > AvrXIntSendMessage(& Receive_Queue, & Uart4_Message.mcb);
> > }
> > }
> > if (Uart5_Sample) Uart5_Sample--;
> > else if (Uart5_State) {
> > if (AvrXTestMessageAck(& Uart5_Message.mcb) == SEM_DONE) {
> > AvrXIntSendMessage(& Receive_Queue, & Uart5_Message.mcb);
> > }
> > }
> > if (! timerHandler--) { // only every 1mS
> > AvrXTimerHandler(); // Call Time queue manager
> > timerHandler = MILLISEC;
> > }
> > Epilog(); // Return to tasks
> > }
> >
> > Queues are primed and it all works well with only one sender. If I
> > enable both senders (Uart4&Uart5) I can see the receiver process
> > looping all the time (LED toogles) even though each only two messages
> > have been sent.
> >
> > Have I missed something, is it not possible to have several messages
> > queued into one process handling it?
> >
> > Cheers, tord
> >
> >
> >
>


#1881 From: "tord.lindner" <tord.lindner@...>
Date: Wed Feb 11, 2009 6:13 pm
Subject: Re: Problems with MessageQueue
tord.lindner
Offline Offline
Send Email Send Email
 
I want to have four 4800 SW-uarts (need the other two as well on the
mega128). My idea was to have a bit sampler which goes on 50uS ticks
and every 1mS do a AvrXTimer. One of the four EXT irq kicks it all off:

SIGNAL(SIG_INTERRUPT4) {
if (! Uart4_State) { // we are in wait for start bit mode
	 if (! (PINE & (1 << PE4))) { // this is good, a low start bit
	 Uart4_Sample = BYTESAMPLE;// ok, lets start
	 Uart4_State++;
         }
} else if (Uart4_State < 10) { // for all data bytes
	 Uart4_Data[Uart4_State       ] = PINE & (1 << PE4);
	 Uart4_Data[Uart4_State++ + 10] = Uart4_Sample;
	 } else Uart4_State = 0; // start all over again
}

Everything works if I only use one message send to the queue, but if I
send off two messages to the same queue once, then the very simple
receiver gets out from AvrXWaitMessage even though nothing has been
sent more to the message box. It just loops same rate as SIG_OVERFLOW0
(50Us), guess the epilog at the end, but since no message is available
it should not return, but it does. Again, only sending one message I
see that the receiver runs every 2mS (as it should).

Since there is a AvrXIntSendMessage I thought it was possible to send
a message to a queue from a ISR. Maybe it is limited to only one message?

thanks for your answers!

cheers,tord


--- In avrx@yahoogroups.com, Dean Hall <dwhall256@...> wrote:
>
> Well, it's hard to say exactly what's going on because you haven't
> included all the code.  For example, I don't see where Uart4_Sample
> and Uart5_Sample are set to non-zero values; and what are the values
> of Uart4_State and Uart5_State?
>
> !!Dean
>
> > I want a quick running ISR sample bits and send it to a process
> > waiting for it, the ISP shall at the most send four different messages
> > in one loop to the same receiver.
> >
> > ///////////////////////////////////////////////
> > AVRX_GCC_TASKDEF(taskReceiver, RECEIVER_MEM, RECEIVER_PRIO) {
> > MessageControlBlock * msg;
> >
> > for (;;) {
> > msg = AvrXWaitMessage(& Receive_Queue);
> > AvrXAckMessage(msg);
> > PORTG ^= (1 << PG3); // just to see what's happening
> > }
> > }
> > /////////////////////////////////////////////
> > AVRX_SIGINT(SIG_OVERFLOW0) {
> > IntProlog();
> > TCNT0 = TIMERTICK;
> > if (Uart4_Sample) Uart4_Sample--;
> > else if (Uart4_State) {
> > if (AvrXTestMessageAck(& Uart4_Message.mcb) == SEM_DONE) {
> > AvrXIntSendMessage(& Receive_Queue, & Uart4_Message.mcb);
> > }
> > }
> > if (Uart5_Sample) Uart5_Sample--;
> > else if (Uart5_State) {
> > if (AvrXTestMessageAck(& Uart5_Message.mcb) == SEM_DONE) {
> > AvrXIntSendMessage(& Receive_Queue, & Uart5_Message.mcb);
> > }
> > }
> > if (! timerHandler--) { // only every 1mS
> > AvrXTimerHandler(); // Call Time queue manager
> > timerHandler = MILLISEC;
> > }
> > Epilog(); // Return to tasks
> > }
> >
> > Queues are primed and it all works well with only one sender. If I
> > enable both senders (Uart4&Uart5) I can see the receiver process
> > looping all the time (LED toogles) even though each only two messages
> > have been sent.
> >
> > Have I missed something, is it not possible to have several messages
> > queued into one process handling it?
> >
> > Cheers, tord
> >
> >
> >
>

Messages 1881 - 1912 of 1912   Newest  |  < Newer  |  Older >  |  Oldest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help