a hobby class on microcontrollers - Page 5

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Re: a hobby class on microcontrollers

Quoted text here. Click to load it

You are right, looks like it is not really a mass product, so the boards
are expensive. Of course, you could buy an ATmega328 in DIP package, 25
pieces for $2.87:

http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=ATMEGA328P-PU-ND

a breadboard for $5,70 (maybe less expensive, if you buy 25, too)

http://www.watterott.com/de/Breadboard-830-Pin

and finally an USB to RS232 TTL level converter for $1,50:

http://tinyurl.com/35oshql

Ok, that's $10,07 and you need additional parts for interesting projects,
and wires and at least one ATmega programmer to program the Arduino
bootloader, but nearly in the single digit area.

Maybe the MSP430 launchpad for $4.30 is better, which include the USB
connection and the USB cable: http://tinyurl.com/34ffxv8 and there is
already lots of sample code available. The only drawback would be the
slightly more difficult development environment. You could solder some
headers to it, for using it with a solderless breadboard, if you don't want
your class to solder.

If you think soldering is part of the fun, it could be less expensive.

--
Frank Buss, fb@frank-buss.de
http://www.frank-buss.de , http://www.it4-systems.de

Re: a hobby class on microcontrollers
Quoted text here. Click to load it
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=ATMEGA328P-PU-ND
Quoted text here. Click to load it

The launchpad is so cheap because TI is subsidizing the "demo tool" to
generate sales.

If you would approach TI with an idea to "get budding engineers started"
you may get them to design a board for you.

I am sure TI is selling 10s of thousands of these boards.
A price break you will never see building it yourself.

TI also gets a tax break for advertising.

Using this board as a standard is a little short sighted.

hamilton


Re: a hobby class on microcontrollers
Quoted text here. Click to load it
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=ATMEGA328P-PU-ND
Quoted text here. Click to load it


Does any one have one of these boards handy ?

Looking at the pics on the web site, I see four chips next to the
mini-USB connector.

What are these chips ?

This board is no $4.30, even if its is a "430".

h

Re: a hobby class on microcontrollers

Quoted text here. Click to load it

There is a schematic on the webpage: MSP430F16x for the emulator and the
programmer interface, TUSB3410VF for the USB to RS232-TTL interface,
TPD2E001 for ESD protection on the USB port, TPS77301 LDO power supply and
CAT24F32UI, an EEPROM. Except the EEPROM, all chips are from TI, so this
could be very cheap for TI.

Quoted text here. Click to load it

But you are right, it doesn't look optimized for price (why not using a
microcontroller with integrated USB?) and maybe manufacturing costs are
higher (the "4.30" as a price is a nice marketing gag). But if they produce
10s of thousands of it, maybe they can sell it at least without loss.

--
Frank Buss, fb@frank-buss.de
http://www.frank-buss.de , http://www.it4-systems.de

Re: a hobby class on microcontrollers
Quoted text here. Click to load it

Loss does not matter, its a marketing deduction.

But it might be close.

h

Re: a hobby class on microcontrollers
On Tue, 06 Jul 2010 13:11:09 -0600, hamilton

Quoted text here. Click to load it

Probably so.


Worth trying.  However, I think I need to have a much clearer
and much more fully fleshed out "business plan" to present,
then.  I don't need to convince me.  But I will need to
convince them if I'm asking them to invest their money.

Still, I like the thought.  I will keep it near the top, for
a while, and may wind up giving it a shot.

Quoted text here. Click to load it

Indeed.  Speaking of which, I _really_ like the USB stick
(actually, there are two different ones but I'm speaking of
one of those two) that comes with the Chronos watch.  It
includes a power/gnd + 2-wire JTAG debugger (4 pins) but also
another 2 pins for Rx and Tx... 6 pin connector.  This comes
up under Windows as both a supported JTAG debugger and flash
programmer as well as a COM port.  With suitable cable and
connectors, this provides something the students can take
home and use on their own.  Since I bought that Chronos for
$24 shipped, and since almost the same thing comes on their
F2013 demo unit which at times sells for $9.99 shipped, I
might be able to worm those out of them as solo pieces I can
use.  Might be worth a conversation, anyway.

Quoted text here. Click to load it

Better, in some cases I'm thinking about, I can provide them
with a 501(c)3 for charitable deductions (if I can convince
the board here to go for it or otherwise form up a separate
one just for this purpose.)  That's work, too.  But with
incentive on both sides, it's a crossable bridge.

Quoted text here. Click to load it

Well, one does need to put one foot in front of another and
make some mistakes.  I have never once seen a 5-year plan for
a new company that came anywhere close to where they were 5
years later.  Or even 3.  Doesn't mean there aren't some very
experienced people adressing themselves to thoroughly mature
markets where everything is pretty much known.  But I haven't
ever worked in those areas and, frankly, that doesn't apply
here at all.  In this sphere, the chances of me knowing most
of what this will look like 3 years from now, assuming there
is anything at all, is.. low.  So short-sighted is about the
only way to go.  It's sparsely mapped waters.

I hope for a usable lookout tower, manned as best I can, and
a lot of unplanned course corrections along the way, I think.
Unless I can convince others to sit down with me and add
their own experience and good knowledge to identify the
'sizzle' for this as well as the core meat in it and we form
the right combination at the right time and somehow also get
lucky.  Since I'm one person and control no others at all,
all I can really be sure of are my own hours.

Good thoughts about contacting TI, though.  I will put that
on my list and follow through when the moment is right.

Jon

Re: a hobby class on microcontrollers

Quoted text here. Click to load it

We can let the students control some GP I/O ports via USB without
programming.

I have posted the Window Apps wdip.exe (talking to com6:), Inf file
for the virtual com port and the USB firmware.  Wdip connects to the
virtual com port and monitor/control 10 GP I/O bits.  You can click on
the second rows of buttons to toggle input/output direction.  For
output ports, click on the third rows of buttons to turn it on and
off.

My virtual com port is com6:.  I still have to work on auto-detecting
the com port.  For now, i will just post wdip4 (com4:), wdip5, wdip6,
etc.

And yes, i know, i have to line up the buttons.

http://linnix.com/udip


Re: a hobby class on microcontrollers

Quoted text here. Click to load it

The board looks nice and is in the price range of the OP. But the demo
application doesn't sound like an interesting project for students. Maybe
enhance it with a simple BASIC interpreter on PC and on the
microcontroller?

BTW: the virtual COM port can cause problems in Windows. I've used for a
customer project LUFA and a generic HID device implementation, which works
on Windows without the need to install INF files or other drivers.

--
Frank Buss, fb@frank-buss.de
http://www.frank-buss.de , http://www.it4-systems.de

Re: a hobby class on microcontrollers
Quoted text here. Click to load it

Yes, that's the plan.  He will do one for the micro and I might (if I
have time) do one on the PC.  I might do a 6502 ICE on the PC, since
the 6502 instruction set is in the public domain (I think).

Quoted text here. Click to load it

It occasionally causes the usb stack to get struck.  Fortunately, it
can recover by unplugging/plugging the board without rebooting
window.  We might switch to win32-libusb eventually.


Re: a hobby class on microcontrollers



Quoted text here. Click to load it

The real status of the 6502 instruction set  is a little fuzzy. The
Western Design Center have made some patent related claims
that have now probably expired

http://www.westerndesigncenter.com/wdc /

I have seen a lot of 6502 based processors pop up in asia in
some cases with opcodes swapped around for all the instructions
except for branches.

Regards


walter..
--
Walter Banks
Byte Craft Limited
We've slightly trimmed the long signature. Click to see the full one.
Re: a hobby class on microcontrollers
Quoted text here. Click to load it

Yes, indeed.  We can order 6502 look alike embedded core in ASIC.
They don't work truly like the 6502, but close enough.  In fact, we
need to build the ICE to target an OTP ASIC.


Re: a hobby class on microcontrollers
Quoted text here. Click to load it

PS: I got a new COM port when I change the device.  I am up to COM7
and COM8 now.  Is there any way to reset it to COM4?  I have nothing
on COM4 and COM6.  I am running WinXP pro.


Re: a hobby class on microcontrollers

Quoted text here. Click to load it

Windows (at least XP) does seem to like to generate multiple ports for
the same device. Over time, it has created three Bluetooth ports for the
single Bluetooth hardware device on this laptop. Why? <shrug>

Cleaning up should be possible by going into the Device Manager applet
and doing a View | Show Hidden Devices. That shows the installed-but-
not-connected devices and allows one to uninstall the duplicates. You
can then go into Properties and force an assignment to a COM port of
your selection for the remaining ones.

As always, mucking about like this can cause Bad Things to Happen ...

--
Rich Webb     Norfolk, VA

Re: a hobby class on microcontrollers
Quoted text here. Click to load it

I tried removing them in regedit. They stopped working.
I tried removing them in device manager.  WinXP just re-install with
another port.
Finally, I did a super-restart (reinstall WinXP).

Quoted text here. Click to load it

No kidding, wasted whole night for this.

Anyway, I got it to restart at COM3, COM4, COM5 and COM6 on a USB
hub.  WinXP even remember the order it was plugged in.  Just hope that
I won't have to change the hub.

I posted the new version of WDIP.EXE (Auto detect COM3 to COM11)
and UDIP1A.HEX UDIP1B.HEX UDIP1C.HEX at:

http://linnix.com/udip

Re: a hobby class on microcontrollers

Quoted text here. Click to load it

I would ignore it.

Quoted text here. Click to load it

When I open WDIP.EXE in a text editor, it seems like your are using "COM3",
"COM4",... "COM12" for opening the COM port. Did you test it for "COM9"?
This will fail on Windows. I'm using this C-code to open a COM-port:

    char buf[100];
    sprintf(buf, "\.\COM%i", m_comPort);
    m_portHandle = CreateFile(buf, GENERIC_READ | GENERIC_WRITE, 0, NULL,
OPEN_EXISTING, 0, NULL);
    if (m_portHandle == INVALID_HANDLE_VALUE) ...

Detecting which COM ports are available on a Windows system is difficult.
The easiest solution would be trying CreateFile for some port range and
testing the result, but this can hang the computer, if a driver is faulty
(which is sometime possible for drivers of some cheap USB adapters), or for
some Bluetooth drivers. But you can try one of the 8 other ways to test it:

http://www.naughter.com/enumser.html

In my application the user has to execute an auto detect function of the
program manually when installing the hardware and then the port number is
saved for subsequent program starts, which is the least trouble, and the
COM port can be choosen without auto detect, if it hangs.

If you don't have to use COM (e.g. if you need Bluetooth on Windows XP
before service pack 2, you need the COM port interface, if you don't want
to use a special Bluetooth stack from a company), use HID for your USB
device, if you don't have high transfer speed requirements. I've written a
Windows application with a HID device for Windows XP and it still works on
Windows 7 without changes. If you use libusb or other drivers, you'll have
to update your software for each new Windows version.

--
Frank Buss, fb@frank-buss.de
http://www.frank-buss.de , http://www.it4-systems.de

Re: a hobby class on microcontrollers

Quoted text here. Click to load it

Why? Is COM9 special on window?

Quoted text here. Click to load it

Yes, I am using CreateFile to open them.



Re: a hobby class on microcontrollers

Quoted text here. Click to load it

Sorry, COM9 should work, but the trouble starts with COM10, see
"Communications Resources" at the manual page:

http://msdn.microsoft.com/en-us/library/aa363858 (VS.85).aspx

That's the reason for my special code to open the COM port. You should test
it with your program. Maybe you can change the port number of your device
in the device manager.

--
Frank Buss, fb@frank-buss.de
http://www.frank-buss.de , http://www.it4-systems.de

Re: a hobby class on microcontrollers
Quoted text here. Click to load it

Thanks for pointing this out.  I fixed the initial scanning, but still
need to remove the invalid entries and handle combo change events.

Re: a hobby class on microcontrollers
Quoted text here. Click to load it

This kind of problem is not unique to windows.
I'm connecting to EUBR32C111-carrier-sub, a 32 bit renesas board
from Glyn.
Upon detection Ubuntu generates a USBtty whatever device, but the
name depends on the circumstances. If I disconnect and reconnect,
I get a different name. (This is the only way to power cycle,
and power cycle seems to be the only way to reset communication.)
So old situation:
        connect to /dev/XXX . Do a symbolic link to
        /dev/modem and configure kermit to use that.
New situation:
    The program has to scan all ports that could possibly connect to
    the board. Then from the communication with some possibly unknown
    devices, infer on which port the renesas board sits.
    For kermit communication: always look in /dev and do a manual
    configuration.

I think this is a design error. If your system features serial
device on USB ports, they should have a fixed name for each
USB port. Then if there is no communication possible on the port
the driver should respond so during open, or just make the device
unreadable/unwritable.

Maybe Bill Gates tried to solve this matter, but goofed on implementation.

One thing that gives hope, is that although the board comes with
USB drivers, they are not needed on Ubuntu. It is an Ubuntu driver,
so it migh get fixed (even by myself.)

Quoted text here. Click to load it

Yeah. You ask Windows to do things neither they or yourself understand
via a complicated menu.

But you spark an idea. On linux I just may proceed as follows:
1. remove all serial USB devices while still powered off, wait long enough
2. connect/power on, now I'll get always the same device name
3. alias to /dev/modem kermit, whatever

If there are more serial USB devices this will not help.
Thank god that not everything is called COM on Linux.

Quoted text here. Click to load it


--
--
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
We've slightly trimmed the long signature. Click to see the full one.
Re: a hobby class on microcontrollers
Quoted text here. Click to load it

Out of curiosity, does the device you use feature a unique serial number?
At least on Windows, a lot of annoying behaviour goes away once the OS is
able to reliably identify devices.

On Linux you can also use udev rules to control the created device names.

-a

Site Timeline