Show Posts
Pages: 1 [2] 3 4 ... 12
16  Using Arduino / Microcontrollers / Re: what does the atmega uc do during every clock cycle? on: July 25, 2013, 03:54:17 pm
I think section 7 of the datasheet describes pretty well what happens.
That's it, that's the point! Section 7 is the topic, the way it's exposed in the datasheet is the limit (to me, at least) I want to overcome.

E.g. A statement like "In a typical ALU operation, two operands are output from the Register File, the operation is executed, and the result is stored back in the Register File – in one clock cycle." does not make clear if each and every clock cycle simply does that and that only. It's misleading to someone who doesn't know how it really works in the first place. It's a correct statement, of course, but not much educational :-(
Every chapter that follows up is filled with precious and complete informations about every detail of the chip, but the way it's exposed makes the task of learning how it really works a bit daunting.

And yes, of course, I'm learning AVR assembly on the way, that's what I'm doing in my spare time. I'd really like to get more confortable with programming assembly. That's why I'd like to clear my mind about the inner workings of the cpu core.
17  Using Arduino / Microcontrollers / Re: what does the atmega uc does in every clock cycle? on: July 25, 2013, 08:47:49 am
Yeah, general knowledge sucks!

Mmhh.... well, that was not what I meant. Whatever.
18  Using Arduino / Microcontrollers / Re: what does the atmega uc does in every clock cycle? on: July 25, 2013, 08:13:34 am
I don't think there's much that's specific to AVR chips on your list.
Try widening your google searches to more general CPUs, look for graphical cpu simulators, etc.

Evidently I was not clear enough. I'm sorry.

I don't want to broaden my search at all. I don't want to find more generic dissertations about microcontroller architectures, there's way too much out there. I'd like to understand more specifically how the AVR micro-controllers (mainly the atmega family) work instead. And I'm mainly interested (at the moment) on how the CPU works during each clock cycle, how it retrieves instructions from program memory, how it reads/writes data memory, how/when program-counter/ALU/IO-Ports are handled.

I'm going to read some more generic textx about harvard architecture machines too of course, but I'd really like to get to the AVR specifics and get a grip on what's truely going on.

I know Atmel's datasheets are precious in this regard, and I keep reading them through. It's just that they're not meant to be used as a teaching tool, so they lack that teaching approach I'm looking for.
19  Using Arduino / Microcontrollers / what does the atmega uc do during every clock cycle? on: July 25, 2013, 06:22:17 am
I'd like to understand what really happens inside the core when it runs some code. I've found something but not much about that. I wonder if someone here can point me in the right direction.

I'd like to better understand what happens at every clock cycle, how does the program memory work, how is data treated, data flow basics, how the ALU uses data from memory and/or from code... I am pretty shure all of this has already been summarized in the past since the atmega ucontrollers have been used as an educational tool for so long.

But I really can't find much :-( well, maybe "too much" to be exact, Atmel's datasheets are more than complete, but they really treat specifications in a not-"educational way". It's more like a compilation of data and facts than a learning tool.

Maybe there's something aimed more at teaching than simply at enumerating how this stuff work. Any hint?
20  Using Arduino / Programming Questions / avrdude ver.5.11-patch#7610 and ver.5.11: differences? on: July 03, 2013, 04:54:00 am
Hi everybody :-)
I installed and used avrdude ver.5.11-patch#7610 on windows for a while now without a problem.
I noticed today that arduino_1.5.2_beta comes with avrdude ver.5.11 (no mention of the 7610 patch). I wonder if there's any difference with the patched version. At first I'd say no, but I'd like to know more from you here.

Cheers
21  Using Arduino / Sensors / Re: How to sense pool cue relative position? on: April 04, 2013, 10:03:55 am
I'd install two lasers pointers at the back end of the cue. Setting some angle between beams, two lasers dots projected on the wall would be split on some distance, depends on the angle and distance between cue's end and wall...

Interesting suggestion. I'll be looking into that. I'd really like to keep it low profile at first though, and this solution seems a bit overengineered to me.

Anyway, one laser only, projecting a dot onto the back wall may suffice in my case, because my main concern is to evaluate Horizontal/Vertical movements. Correlating it with the Longitudinal displacement would be a well accepted plus, of course :-)
22  Using Arduino / Sensors / Re: How to sense pool cue relative position? on: April 04, 2013, 06:55:47 am
I've given up with the ultrasonic sensor, I can't find a reasonable high-resolution/low-range sensor that works for me.

I'm considering a hall effect sensor (or an array of them) now. I may wrap a solenoid around the cue stick and place an array of sensors at short distance at its sides. It may takes some calibration but if things are done right I may be able to "sense" distance variations (which is my main concern, being the absolute distance not the point of it at all). I wonder if I will get consistent and usable measurements. Any hint in that direction is well appreciated :-)

23  Using Arduino / Sensors / Re: How to sense pool cue relative position? on: April 02, 2013, 09:30:13 am
The wooden cue's diameter is approx 3cm and Id like to achieve a 1mm resolution.

I'm trying an HC-SR04 ultrasonic distance sensor that I had at home (and never used before); it works with wooden fine but minimum distance is 2cm and resolution is poor.
I wonder if there are other cheap ultrasonic sensors around with higher resolution and lower range to play with.

The fact that ultrasonic sensors work with wooden is a plus I like :-)
24  Using Arduino / Sensors / How to sense pool cue relative position? on: April 02, 2013, 06:52:24 am
Hi everybody,
 I am trying to build a device that will measure and visually report a billiard cue's position relative to the ground table. It's meant to be an aid in correcting players' cue stroke. But I still don't know how can I sense the cue's poisition. Maybe you could help with some suggestions.

I thought about a device made of a base plate and two vertical plates within which the cue will move longitudinally.
The cue will move horizontally and vertically too, that's what interests me more. The horizontal and vertical movements are to be considered a mistake in player's stroke and have to be minimized in order to have a more precise stroke. That's why I want to measure it in some way and play a real time visual feedback to the the user while practicing.

See attached picture for details.
 
The cue stick is made of wood, and I'm willing to attach other stuff to it if needed (I'm thinking about metals, magnets, reflective stuff ...) by the measuring sensor. But I'm not going to brake open the cue, make the modification permanent and damage it.
 
Do you have any idea how can I approach this situation? I'm willing to consider different solutions. I'm open to any suggestion at the moment.
25  Using Arduino / General Electronics / Re: What does an EPROM chip do on a AGP VGA board? on: March 01, 2013, 03:20:41 am
I see, and it looks like a VGA BIOS may be modded and burned back into the chip on modern boards ... well, in old ones, like the one I started looking into, it's impossible since it's an EPROM and can't be burned again. Anyway, it's all clear to me now.
I'll keep reading about it, I wonder if that EPROM may be switched with something else, something one can customize ...
26  Using Arduino / General Electronics / What does an EPROM chip do on a AGP VGA board? on: February 28, 2013, 05:06:28 am
Just wondering what's the function of an HT27C512-70 EPROM chip on an old AGP nVidia Vanta VGA board. The board sports an nVidia Riva TNT2 processor. I wonder what's the use of an accessory EPROM chip. Just so, because I'm curious :-)
27  Using Arduino / Programming Questions / Re: What does abort() do? on: January 25, 2013, 12:10:40 pm
Users should not complain about the code they get. They are lucky to get anything at all.

Priceless!!! smiley-grin
28  Using Arduino / Programming Questions / Re: What does abort() do? on: January 24, 2013, 07:00:18 pm
If you do nothing special...

Code:
#include <assert.h>

void setup( void )
{
  assert( false );
}

void loop( void )
{
}

abort is called if the assertion fails.  stderr does not come into the picture.

That's all clear to me. That's how I already used it after you suggested it to me.
But ... that way, it does no more than calling abort(), right? Why should I even bother with calling assert() then? What's the point if it does'nt add anything new to the picture?
29  Using Arduino / Programming Questions / Re: What does abort() do? on: January 24, 2013, 05:35:45 pm

It could ... but I don't have the slightest idea of how to direct stderr to the serial ... so why bother adding this layer of complexity?
No, seriously, how may I define __ASSERT_USE_STDERR ? Do I get to redirect it to the serial channel? How?

Anyway, I find usefull that I can disable the assert() when I'm finished debugging, by simply defining NDEBUG once and for all.
That's cool to know :-)
30  Using Arduino / Programming Questions / Re: What does abort() do? on: January 24, 2013, 04:00:54 pm
Quote
I'm not going to write some crazy complex error handling routine for this particular purpose anyway, enough being to simply stop everything.
In CATIA, we have, occasionally, dialog boxes that pop up that say "Click OK to terminate", like someone would really want to.

The cause is almost always a result of failing to handle an exception. That sounds like what you are planning to implement.

I would strongly encourage you not to do that. Restarting the Arduino because of a type, or noise on the serial line, or some other strange input arriving is not a best practice. It's far better to simply ignore out-of-range data.

I completely agree with you, andI usually tend to spend quite some time on error handling. Especially because I'm not a professional programmer, so I'm going to use the code for myself, not for customers ;-)

In this case I'm going to use abort() in a preliminary stage of the coding. I'm not going to bother much about providing valid alternative default values in case the input is going to be unacceptable. It's ok to me if it runs an infinite loop. It doesn't break anything at the moment. But it's good to know what it does precisely :-)
Pages: 1 [2] 3 4 ... 12