> You can improve that to a single pin by emulating a UART. Emit a
> long start pulse, followed by the binary describing the state, and
> a long stop pulse. As long as the scope sweep is long compared to
> the complete signal, less the stop pulse, you should easily
> maintain sync. This assumes you can control the pulse lengths
> reasonably well so that the bits are well delimited by the scope
> reticule. Probably not reasonable for over 20 bits of state info.
> You could even make the start pulse considerably shorter than the
> bit times.
Just thinking out loud here, but for viewing state on a scope I'd like
to see bit starting point clearly identified. Something like 3/4 on
and 1/4 off for a '1', and 1/4 on, 3/4 off for a '0'. That way every
rising edge is the start of a new bit.
There are lots of useful debugging things you can do with a single bit
and a scope.
Reply by Charles Marslett●October 12, 20062006-10-12
On Sat, 30 Sep 2006 09:55:21 +1200, Jim Granville
<no.spam@designtools.maps.co.nz> wrote:
>Mike Silva wrote:
>> Jim Granville wrote:
>>
>>>...Or if 8 bits in a 3mm package scares you a little, this alternative
>>>http://www.zilog.com/docs/zneo/FL0121.pdf
>>>
>>>gives you 16 x 32 bit register CPU. Large PCB+Compiler ToolChain and In
>>>System Debug, is <$50.
>>
>>
>> Jim, your posts on this board have talked me into getting one myself.
>> Never hurts to play around with another device family.
>
>Let us know how you get on. I have not got my hands on one yet, but
>I'm tempted to give one to my son. Appeal is the low price, and ALL docs
>and Tools come from one company. Caution is, it is new silicon, but for
>teaching that's not such an issue. [for work, I'll stick with 8051,
>until an app screams for more crunch-power :)]
>
>-jg
And I would recommend the TI MSP-430 USB key. You can carry it around
in your pocket, comes with an debugging system, tool chain and a "sort
of" 16-bit processor with 8 I/O pins. For $15 if you sign up for
their contest or whatever it is.
As someone else mentioned about TI processors, you get all the
documentation you could want (lots of sample code, processor docs,
etc.) from TI, but it is TI documentation. You get to read it and
re-read it....
--Charles
Reply by Michael R. Kesti●October 12, 20062006-10-12
CBFalconer wrote:
>"Michael R. Kesti" wrote:
>
>> It was'nt Morse, but I've been known to output a state machine's
>> state index using two output pins. At the state machine's entry
>> point one output was toggled to generate a sync pulse and then the
>> other output was toggled after a number of times equal to the state
>> variable. A dual-trace 'scope monitoring the outputs and triggered
>> by the the sync pulse displayed the state variable quite nicely!
>
>You can improve that to a single pin by emulating a UART. Emit a
>long start pulse, followed by the binary describing the state, and
>a long stop pulse. As long as the scope sweep is long compared to
>the complete signal, less the stop pulse, you should easily
>maintain sync. This assumes you can control the pulse lengths
>reasonably well so that the bits are well delimited by the scope
>reticule. Probably not reasonable for over 20 bits of state info.
>You could even make the start pulse considerably shorter than the
>bit times.
That's an improvement in terms of pin count, but is more complex to code
and consumes more execution time, too. Always remember and never forget
that there are ALWAYS tradeoffs!
--
========================================================================
Michael Kesti | "And like, one and one don't make
| two, one and one make one."
mrkesti at hotmail dot com | - The Who, Bargain
Reply by CBFalconer●October 11, 20062006-10-11
"Michael R. Kesti" wrote:
> Grant Edwards wrote:
>> Fred Bartoli wrote:
>>> Mark McDougall a �crit :
>>><snipped>
>>>> 4. Masochistic tendencies. Debugging real-time multi-threaded
>>>> apps using a single LED and a CRO is not unheard of! ;)
>>>>
>>> Morse code?
>>
>> Yes, it's been done.
>
> It was'nt Morse, but I've been known to output a state machine's
> state index using two output pins. At the state machine's entry
> point one output was toggled to generate a sync pulse and then the
> other output was toggled after a number of times equal to the state
> variable. A dual-trace 'scope monitoring the outputs and triggered
> by the the sync pulse displayed the state variable quite nicely!
Reply by Michael R. Kesti●October 11, 20062006-10-11
Grant Edwards wrote:
>On 2006-09-29, Fred Bartoli <fred._canxxxel_this_bartoli@RemoveThatAlso_free.fr_AndThisToo> wrote:
>> Mark McDougall a �crit :
>><snipped>
>>> 4. Masochistic tendencies. Debugging real-time multi-threaded apps using
>>> a single LED and a CRO is not unheard of! ;)
>>>
>> Morse code?
>
>Yes, it's been done.
It was'nt Morse, but I've been known to output a state machine's state index
using two output pins. At the state machine's entry point one output was
toggled to generate a sync pulse and then the other output was toggled after
a number of times equal to the state variable. A dual-trace 'scope monitoring
the outputs and triggered by the the sync pulse displayed the state variable
quite nicely!
--
========================================================================
Michael Kesti | "And like, one and one don't make
| two, one and one make one."
mrkesti at hotmail dot com | - The Who, Bargain
Reply by Grant Edwards●October 9, 20062006-10-09
On 2006-09-29, Fred Bartoli <fred._canxxxel_this_bartoli@RemoveThatAlso_free.fr_AndThisToo> wrote:
> Mark McDougall a �crit :
><snipped>
>> 4. Masochistic tendencies. Debugging real-time multi-threaded apps using
>> a single LED and a CRO is not unheard of! ;)
>>
>
> Morse code?
Yes, it's been done.
--
Grant Edwards grante Yow! I'm having
at a tax-deductible
visi.com experience! I need an
energy crunch!!
Reply by Isaac Bosompem●September 29, 20062006-09-29
Meindert Sprang wrote:
> "dosadih" <dosadih@gmail.com> wrote in message
> news:1159515834.500176.320520@i42g2000cwa.googlegroups.com...
> >
> > Demon wrote:
> > > I am student of computer science. i have good skill of programming in
> > > C/C++. I want to start learning Microcontroller Programming. What is
> > > the pre-requisite to get started and what kind tools (Software and
> > > Hardware) i need to get a start.
> >
> > Start with Microchip PIC microcontroller. It's a good trainning.
>
> No, that is true Masochism! Unless he wants to learn how a processor should
> not be designed....
>
> Meindert
haha, the PIC was my starting MCU. But before then I had already done
low level programming on the PC and other platforms so I wasn't too
scared lol.
But I truly found the chip a bit awkward to work with on the assembly
level. I did some pretty fun projects!
I actually did some work with the Z80 first. Here is a pic of my system
(Please excuse the shoddy construction):
http://i28.photobucket.com/albums/c239/x86asm/IMG00044.jpg
Of course no one does this anymore since I took up a whole damn board
with the design. It was fun to build and still works today! It's
firmware is quite basic, made a simple command line program to
communicate with the firmware to load programs on it. I even added an
output port to play around with external electronics. The black chip on
the left hand side of the board with the crystal below it is the UART
(CP82C52), I also use it to supply the clock to the Z80 CPU (IC w/ gold
square, authentic chip by Zilog, manufactured in 1978). The crystal
oscillator above the CPU for some reason did not like me and did not
want to drive a good, clean clock. I have forgotten what the problem
was. It was a good experience to build it. (I have the firmware
source, plan to extend it sometime soon).
Also as a side note, I debugged the hardware on this thing with a
simple digital multimeter. Neat eh?
Also this was my first serious PIC project (w/ a 16x1 LCD). A friend of
mine told me to put J-Unit on it so I was like why not. Sadly I don't
think I still have the ASM source for it:
http://i28.photobucket.com/albums/c239/x86asm/IMG00091.jpg
(Once again please excuse the shoddy soldering).
This project was fairly easy, slapped in a 10k pot to control the
contrast, used the 4-bit mode to communicate with the 44780 and wrote
the asm code quite quickly. It was a snap on the PIC (see the PIC is a
suitable fit for something!). I also later extended it to use the PWM
output on the PIC to control the contrast through software.
I am no professional, but I am currently playing with the ARM7 (from
Atmel) and TI MSP430 (See these guys have rubbed off onto me). I would
like to diversify and get experience for all chips.
I'm just saying (to the OP, not ya Meindert) that you should see what
each MCU manufacturer has to offer and learn about their offerings.
That way you can decide for your own projects which chip is best. And
also do a project you enjoy that way a setback won't stop you from
continuing, cause you will encoutner setbacks.
-Isaac
Reply by Jim Granville●September 29, 20062006-09-29
Mike Silva wrote:
> Jim Granville wrote:
>
>>...Or if 8 bits in a 3mm package scares you a little, this alternative
>>http://www.zilog.com/docs/zneo/FL0121.pdf
>>
>>gives you 16 x 32 bit register CPU. Large PCB+Compiler ToolChain and In
>>System Debug, is <$50.
>
>
> Jim, your posts on this board have talked me into getting one myself.
> Never hurts to play around with another device family.
Let us know how you get on. I have not got my hands on one yet, but
I'm tempted to give one to my son. Appeal is the low price, and ALL docs
and Tools come from one company. Caution is, it is new silicon, but for
teaching that's not such an issue. [for work, I'll stick with 8051,
until an app screams for more crunch-power :)]
-jg
Reply by Dennis Clark●September 29, 20062006-09-29
Demon <demon.lhr.pk@gmail.com> wrote:
: I am student of computer science. i have good skill of programming in
: C/C++. I want to start learning Microcontroller Programming. What is
: the pre-requisite to get started and what kind tools (Software and
: Hardware) i need to get a start.
I'm glad you didn't say "embedded", there would be no answer to the
question since no two people can agree upon the difinition...
Regardless, the answer is : it depends.
Working with micros is WAY different from working with the "big iron"
of the high level language world. A run time error results in your
code going off into the weeds or doing something that you don't want.
You don't have a console, you won't get any warnings and you'll have
to use logic to figure out what went wrong. This means you need to
know the hardware architecture of the device you are working with.
The above means that you're going to have to learn some electronics
and your're going to have to learn how a microcontroller works. THAT
in turn means you're going to need to learn some assembly on something,
it doesn't matter what since the point is to learn low LOW level
programming, the syntax differs between the various types of devices
but the concepts remain the same.
So in summary you will need to learn about:
microcontroller/microprocessor internals (harvard vs. Von Neuman)
electronics
assembly and micro concepts like pipelining and instruction cycles
The good part is that no matter what you start with, the basic concepts
will move from device to device with just minor changes in specifics.
have fun!
DLC
--
============================================================================
* Dennis Clark dlc@frii.com www.techtoystoday.com *
* "Programming and Customizing the OOPic Microcontroller" Mcgraw-Hill 2003 *
============================================================================
Reply by Ulf Samuelsson●September 29, 20062006-09-29
Demon wrote:
> I am student of computer science. i have good skill of programming in
> C/C++. I want to start learning Microcontroller Programming. What is
> the pre-requisite to get started and what kind tools (Software and
> Hardware) i need to get a start.
The best thing to start with is to find some that can show you what to do.
If you want to *learn* programming, you actually do not need any H/W.
For the AVR, you can download
AVR Studio - Free of charge
IAR Embedded workbench (Free of charge - code limited to 4 kB)
AVR Studio can simulate most peripherals and you have a nice I/O view
so you can look what is happening inside the chip.
If you like to work more on hardware, then you can actually
simulate a limited set of external stuff, like LCD control.
It is possuible with the LCD plug in. to "draw" the LCD as a bitmap
using "Paint" or similar, generating a file for each LCD segment.
The simulator will then lit/unlit the segment on the PC screen when
the simulated AVR accesses the internal LCD controller.
If you want to, you could extend this by getting the AVR Studio SDK
and write some code to simulate buttons or LEDs etc.
A cool plugin would connect the simulated UART to the PC UART.
Once you are ready for H/W, then the AVR Dragon emulator is about $40 and
the
STK500 Development board is about $79.
Best Regards,
Ulf Samuelsson
ulf@atmel.com
GSM: +46 (706) 22 44 57
Tel: +46 (8) 441 54 22
Fax: +46 (8) 441 54 29
Mail: Box 2033 174 02 Sundbyberg
Visit: Kavalleriv�gen 24
174 58 Sundbyberg'
Sweden
--
Best Regards,
Ulf Samuelsson
ulf@a-t-m-e-l.com
This message is intended to be my own personal view and it
may or may not be shared by my employer Atmel Nordic AB