Addicted to writings codes on AVR using C

Go To Last Post
29 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think I have become addicted :(
Even at work I am wondering how to write something on AVR when I get home! grrrr....
C language is addictive! The challange of writing something in a small footprint (memory and processingwise) only intensifies the feelign of addiction... :roll:

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's the sublime feeling resulting from the contradiction of being able to change the physical operation of machinery through the manipulation of symbols. Plus the primal masculine feeling of power that results from the creation of machinery that imitates physical work.

Women don't get this primal feeling of power from the creation of machinery or the manipulation of symbols. They get it directly through the actual creation of human life. It's the main reason why there are so few women in the electronics/computer industry.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That's all a bit too deep to digest on a Tuesday morning......

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:
That's all a bit too deep to digest on a Tuesday morning......
... especially when London is burning and the share markets are going down the toilet :lol:

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

luvocean1, so long as you don't get the "shakes", you should be alright. :D

Simonetta wrote:
Women don't get this primal feeling of power from the creation of machinery or the manipulation of symbols. They get it directly through the actual creation of human life. It's the main reason why there are so few women in the electronics/computer industry.
If that were true about the 'modern' woman birth-rates wouldn't be so dangerously low in Western Civilization. I know / heard of PLENTY of professional women that can't wait to get back to work to make that money and get back to their "status/meaningful" jobs ( blue-collar ones also can't be bothered to raise their kids... day-care here they come ). When no-fault divorce really took off in the '60s in USA, the divorce rate went up big time...women wanted their freedom and pursue status in the workplace and this country still has problems with a whole lot of women not letting anything or anybody keep them from their ambitions. I could go on, but well the point is ( Western anyway ) women have plenty enough issues when it comes to primal feelings of ( using / chasing after / holding onto ) power...

1) Studio 4.18 build 716 (SP3)
2) WinAvr 20100110
3) PN, all on Doze XP... For Now
A) Avr Dragon ver. 1
B) Avr MKII ISP, 2009 model
C) MKII JTAGICE ver. 1

Last Edited: Tue. Aug 9, 2011 - 08:57 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Still gonna be deep, even after your third cup of coffee

Kartman wrote:
That's all a bit too deep to digest on a Tuesday morning......

Gary - W4GNS
Tel: BR549

In my many years I have come to a conclusion that one useless man is a shame, two is a law firm and three or more is a congress. -- John Adams

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

valusoft wrote:
Kartman wrote:
That's all a bit too deep to digest on a Tuesday morning......
... especially when London is burning and the share markets are going down the toilet :lol:
I just time traveled 3 hours into the past, too deep for sure. Which direction is the water spinning?

"I may make you feel but I can't make you think" - Jethro Tull - Thick As A Brick

"void transmigratus(void) {transmigratus();} // recursio infinitus" - larryvc

"It's much more practical to rely on the processing powers of the real debugger, i.e. the one between the keyboard and chair." - JW wek3

"When you arise in the morning think of what a privilege it is to be alive: to breathe, to think, to enjoy, to love." -  Marcus Aurelius

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I might have to agree with simonetta...hhm...
As for the rest of the posts... LOL!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
C language is addictive!
So is smoking and drug taking but they do LESS damage to your brain!! :mrgreen:

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I agree that C is addictive as I'm also a bit addicted. But when you know the limitations, you like it less.
First problem, you can't parallely run loops, or program portions.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

arupbsk wrote:
I agree that C is addictive as I'm also a bit addicted. But when you know the limitations, you like it less.
First problem, you can't parallely run loops, or program portions.

nothing ever runs completely in parallel.. well, unless you have one of those multi-core CPUs, but even then maybe four threads or so would proceed in parallel, still sharing plenty of resources and getting blocked to resolve conflicts such as access to RAM or disk..
if you're talking about the 'pseudo' parallelism provided by a preemptive operating system, then it is a feature of the OS and we know which language most OSes are written in..
C just gives you the real (and dirty) picture while other languages hide these away from you.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Where's Jeckson when you need some clarity?

Chuck Baird

"I wish I were dumber so I could be more certain about my opinions. It looks fun." -- Scott Adams

http://www.cbaird.org

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

nothing ever runs completely in parallel.. well, unless you have one of those multi-core CPUs

Or an FPGA.. (But then your language of choice would prolly be VHDL or Verilog.)

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

And in VHDL it's 'complicated' to do things in sequence. You have to explicitly code it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

arupbsk wrote:
I agree that C is addictive as I'm also a bit addicted. But when you know the limitations, you like it less.
First problem, you can't parallely run loops, or program portions.

Multi-tasking fork() :-P

try uC linux ;-)

First, let me dispose of Socrates because I am sick and tired of this pretense that knowing you know nothing is a mark of wisdom.

I. Asimov

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

First problem, you can't parallely run loops, or program portions.

That depends on the processor:

http://gcc.gnu.org/wiki/openmp

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
That depends on the processor:

I've learnt C from Kanetkar & Balagurusamy's books. And I haven't still seen any compiler that compiles parallel threads for specific processor.
Can you suggest me some book for that kind of C?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

And I haven't still seen any compiler that compiles parallel threads for specific processor.
Can you suggest me some book for that kind of C?

I just did - did you follow the link? OpenMP is supported by a number of compilers, GCC is just one:

http://en.wikipedia.org/wiki/Ope...

Quote:
Visual C++ 2005, 2008 and 2010 support it

Quote:
A few compilers have early implementation for OpenMP 3.0, including

* GCC 4.3.1
* Nanos compiler
* Intel Fortran and C/C++ versions 11.0 and 11.1 Compilers, Intel C/C++ and Fortran Composer XE 2011 and Intel Parallel Studio.
* IBM XL C/C++ Compiler


See that same Wikipedia page for a "hello world" example in C.

For an example of the kind of CPU you might use it on see:

http://en.wikipedia.org/wiki/SIMD

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

They get it directly through the actual creation of human life.

So you've figured out how to do it without assistance?

Cheers,

Joey

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

th33lf wrote:
.. nothing ever runs completely in parallel..

Two or more AVRs running off the same clock side by side will run in parallel.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Heh. Dual core ATtiny4... would two UDFN packages on a 10-pin breakout board count as an MCM?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Nothing, NOTHING really runs in true paralell, by using granularity, we can say things happen 'at the same time'
On AVR's in C you usually use interrupts to do the magic.
If your level of granularity is to high (things need to happen within uS of each other) AVR's are not the answer.

Just about every compiler I have used in the last 20 years has had some type of thread handling capacity.

Looks like a classic case of someone not saying 'what they need'!?!?!?

First, let me dispose of Socrates because I am sick and tired of this pretense that knowing you know nothing is a mark of wisdom.

I. Asimov

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Nothing, NOTHING really runs in true paralell

Of course they do on a multi-processor computer. How do you think a Cray XMT works? What are the other 8,191 CPUs doing when one is executing code otherwise?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JimK wrote:
th33lf wrote:
.. nothing ever runs completely in parallel..

Two or more AVRs running off the same clock side by side will run in parallel.

You are missing the 'granularity' point!

If I want a granularity of the maximum clock resolution of the AVR chip, running 2 in parallel will lead to timing issues, or a very complicated clock propagation maps...

EVEN the time is roughly right.

Time is a construct of the AVERAGE of 30-odd atomic clocks from around the world.

Want to start talking nuclear physics...

...So, back to the original question:-

@arupbsk - "What are you trying to do that you think you need parallel code execution?"

First, let me dispose of Socrates because I am sick and tired of this pretense that knowing you know nothing is a mark of wisdom.

I. Asimov

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Barman! Two pints of whatever my friend here is drinking.

(Is Jeckson on holiday?)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
Barman! Two pints of whatever my friend here is drinking.

(Is Jeckson on holiday?)


Nice sig though...

:)

--greg
Still learning, don't shout at me, educate me.
Starting the fire is easy; the hardest part is learning how to keep the flame!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
(Is Jeckson on holiday?)
No, he's been very busy PMing me. He's asking me to find vulnerabilities on his web site. I don't do that sort of thing. Anybody interested in helping me out?

"I may make you feel but I can't make you think" - Jethro Tull - Thick As A Brick

"void transmigratus(void) {transmigratus();} // recursio infinitus" - larryvc

"It's much more practical to rely on the processing powers of the real debugger, i.e. the one between the keyboard and chair." - JW wek3

"When you arise in the morning think of what a privilege it is to be alive: to breathe, to think, to enjoy, to love." -  Marcus Aurelius

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JimK wrote:
Two or more AVRs running off the same clock side by side will run in parallel.

Oh yeah right, how could I have ever missed that! :lol:

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MrL4rd wrote:
Looks like a classic case of someone not saying 'what they need'!?!?!?

I agree!