Show Posts
Pages: [1] 2 3 ... 452
1  Using Arduino / Installation & Troubleshooting / Re: how to identify a arduino? on: July 29, 2014, 03:20:41 pm
You need to install a power jumper on the pins between the USB connector and power supply connector.  For powering from USB, add a jumper between the middle pin and the pin labeled "USB".  Otherwise, the board has no power.

Download drivers from
(note that some revisions are not supported in windows8!)
That should get the com port to show up.

Set "board" to "Aduino NG or older w/ Atmega8"
2  Using Arduino / Microcontrollers / Re: Serial baud rate on: July 29, 2014, 04:00:14 am
You will need a modified boards.txt for a 8MHz atmega8, regardless of bootloader.
3  Development / Other Hardware Development / Re: $4 Cypress PSoC 4/ 4200 Prototype Board on: July 29, 2014, 03:48:37 am
for comparison, Arduing 1.0.5 is around 8.6K of files and 660MB
Really? My windows 1.5.6 install is less than 400MB, and about 7500 files.  That includes both both AVR and ARM toolsets...

one of these "serious" development boards is a real eye-opener if you've been playing with arduinos for a while.  TI published a very nice tutorial on using the Stellaris Launchpad, and "remove the board from the box" was step 25 or so, after you had downloaded and installed (separately) IDE, drivers, libraries, and etc...
4  Using Arduino / Microcontrollers / Re: Serial baud rate on: July 29, 2014, 12:30:07 am
Even the "stock" optiboot getch() (from C) is shorter than your SW uart code example...  (12 words (11 without the wdr) vs 13)
  while(!(UART_SRA & _BV(RXC0)))
    7f8c: 80 91 c0 00 lds r24, 0x00C0
    7f90: 87 ff        sbrs r24, 7
    7f92: fc cf        rjmp .-8      ; 0x7f8c <getch>
  if (!(UART_SRA & _BV(FE0))) {
    7f94:       80 91 c0 00     lds     r24, 0x00C0
    7f98:       84 fd           sbrc    r24, 4
    7f9a:       01 c0           rjmp    .+2             ; 0x7f9e <getch+0x12>
    7f9c:       a8 95           wdr
  ch = UART_UDR;
    7f9e:       80 91 c6 00     lds     r24, 0x00C6
  return ch;
    7fa2:       08 95           ret
5  Using Arduino / Microcontrollers / Re: Serial baud rate on: July 29, 2014, 12:15:42 am
I could not find a bootloader for operation at 8Mhz, hence using the original the device would run at half speed, with PWM and timer functions delayed by half.
The bootloader speed has nothing to do with the PWM and TIMER functions of the sketch.  It ONLY affects the UART speed, and ONLY during bootloading.

Optiboot runs fine at 8MHz and 56kbps ("half speed.")  Also, it uses the WDT for its timeout, which is a separate clock from the system clock.

The hardware uart needs at least 8 clocks per bit, and always samples near the "middle" of a bit.  A software uart could be tuned to go a bit faster than that, and would have the freedom to pick the sampling times "more conveniently."  For example, it was recently pointed out that you can't do 9600bps on a 1MHz AVR, because the needed divisor falls nearly exactly between two integers (5.5?), and picking either one gives you more than the maximum allowable error.  I doubt that a SW uart implementation would have any problem with it...

This comes at a cost, of course.  The HW uart gives you about 20 bit-times of time in between REQUIRED port reads where you can do other stuff (like compare the last character you read to your command characters.)

this is for a 64 byte version of optiboot
I'll believe THAT when I see it!
My minimal HW uart code (including the watchdog reset) is:
getchl: ldd ARG, Y+0 ;character ready?
  sbrs ARG, 7
rjmp getchl
ldd ARG, Y+6
That's about half the size of your "small" SW uart, and I still couldn't get optiboot down even to 256 bytes.  You can do a smaller bootloader, of course, but I don't believe that you can duplicate what optiboot does, enough to work with "-carduino"
6  Using Arduino / General Electronics / Re: Regulation of water flow on: July 28, 2014, 03:10:43 pm
If you have N on/off valves, each with a manual flow limiter, you can achieve 2^N flow rates...
Some sort of Gray Code scheme would probably be useful...
7  Using Arduino / Microcontrollers / Re: Serial baud rate on: July 28, 2014, 03:05:13 pm
a tuned internal oscillator
Note that the "factory calibration" value is for 8MHz +/-10%, at 3V.
In theory, that could be "not good enough" for serial communications.
8  Using Arduino / Programming Questions / Re: Unicode characters in Arduino on: July 27, 2014, 09:45:04 pm
I believe that in the absence of actual unicode (ie using an 8-bit character set), you MUST set your display device to match the particular character set you are using MANUALLY.

puTTY is a popular windows terminal emulator that is more powerful than the arduino serial monitor.  It's documentation says:
4.10.1 Controlling character set translation

During an interactive session, PuTTY receives a stream of 8-bit bytes from the server, and in order to display them on the screen it needs to know what character set to interpret them in.

There are a lot of character sets to choose from. The ‘Received data assumed to be in which character set’ option lets you select one. By default PuTTY will attempt to choose a character set that is right for your locale as reported by Windows; if it gets it wrong, you can select a different one using this control.

A few notable character sets are:

    The ISO-8859 series are all standard character sets that include various accented characters appropriate for different sets of languages.
    The Win125x series are defined by Microsoft, for similar purposes. In particular Win1252 is almost equivalent to ISO-8859-1, but contains a few extra characters such as matched quotes and the Euro symbol.
    If you want the old IBM PC character set with block graphics and line-drawing characters, you can select ‘CP437’.
    PuTTY also supports Unicode mode, in which the data coming from the server is interpreted as being in the UTF-8 encoding of Unicode. If you select ‘UTF-8’ as a character set you can use this mode. Not all server-side applications will support it.

If you need support for a numeric code page which is not listed in the drop-down list, such as code page 866, then you can try entering its name manually (CP866 for example) in the list box. If the underlying version of Windows has the appropriate translation table installed, PuTTY will use it.
9  Using Arduino / Installation & Troubleshooting / Re: how to identify a arduino? on: July 27, 2014, 08:18:23 pm
It's a "counterfeit" :-(
The "Board type" is determined by the big chip you say is labeled "atmega8l"; that probably means you want "Arduino NG or Older w/ ATmega8"
The drivers you need are determined by the second-largest chip, near the USB connector.  I can't quite read that.  If it says "FT232RL", you need the FTDI drivers, same as the older arduinos (and still included with the Arduino IDE.)  If it says "PL2303" you need a Prolific USB/Serial driver (and probably, an older version of the prolific driver that doesn't include checks for counterfeit prolific chips; it's a widely counterfeited chip, and Prolific got pissed off.)   Your OS may already include drivers: if it creates a serial port when you plug it in, you don't need to install anything.
10  Using Arduino / Programming Questions / Re: Unicode characters in Arduino on: July 27, 2014, 08:05:10 pm
what the arduino is reading is not what it should be

It's more likely that the arduino is reading the unicode just fine, but is not managing to transmit/display to whatever display device you are using.  What you're getting is probably  the result of displaying 8bit codes greater than 128, while what you want is to display 16bit unicode.  (what IS your display?  For instance, I don't know offhand of any "Serial monitor" like programs that read unicode...  The Arduino Serial Monitor certainly doesn't do it.)
11  Using Arduino / Programming Questions / Re: State machines on: July 27, 2014, 07:58:01 pm
The UTX "embedded programming" class (using Stellaris/Tiva LaunchPad) included an assignment that was to be implemented using a state machine.  a LOT of people had a LOT of trouble with that assignment :-(

State machines work nicely if you know exactly what should be happening, and can accurately convert that to a state transition table.  When there are ambiguities and poor understanding, you end up with a project that is very hard to debug (sort of a machine-language...)
12  Using Arduino / Microcontrollers / Re: Burn BootLoader......... on: July 27, 2014, 06:05:55 pm
You can, however, build a version of the bootloader that does the initial "LED Flash" on some pin other than D13, or omits it entirely.
You would download the repository into somewhere like .../hardware/arduino/bootloaders/optibootnew, and run a "make" there something like:
 make ENV=arduino LED_START_FLASHES=0 atmega328
  make ENV=arduino LED=PB1 atmega328
(Note that pin names for the optiboot build are Port/Bit based rather than Arduino pinnumber based.)
(The modifications to the optiboot source that allow this to be done from the build line, instead of requiring source modifications, are relatively "new", and not in the version of optiboot currently distributed with the arduino IDE.)

13  Development / Suggestions for the Arduino Project / Re: Does Arduino have a future? on: July 27, 2014, 05:39:29 pm
an old version of Unix might be a good real time OS, at least for 32 bit devices.
One of the chipKit (PIC32 Arduino-like board) has had 2.9bsd ported to it.  Old time operating systems do not tend to handle "small ram, large flash" configurations very well.

The "big OS-running cpu" and "little bare-metal IO cpu" (ala Yun or those NXP M0/M4 chips) has potential, given suitable communications protocol(s).

A lot of intermediate-sized OS development gets distracted by "real time", which complicates everything and may not be necessary (arguably, Arduino is already NOT "real-time.")
14  Using Arduino / Installation & Troubleshooting / Re: __builtin_avr_delay_cycles on OSX/Linux on: July 27, 2014, 02:32:08 am
Arduino has a pretty old (2010, version 4.3.2) version of the avr-gcc; perhaps that was before __builtin_avr_delay_cycles() existed.
(Arduino SHOULD include the same version on all OSes these days; are you sure your windows system isn't using WINAVR or something instead of the arduino-provided compiler?)
15  Development / Suggestions for the Arduino Project / Re: Does Arduino have a future? on: July 26, 2014, 08:32:59 pm
Ive been thinking about this for a bit, and I've had a couple of thoughts:

1) The original arduino was aimed at incorporating ELECTRONICS in art/design/hobby projects.  Because for a couple of decades now, the response to most "I want my thing to do something electronic" desires has been (and should be) "you should throw in a microcontroller to do that."   Except that using microcontrollers was difficult and relatively expensive (not counting Basic Stamps, I guess.)

The Arduino abstractions, philosophies, and libraries are more-or-less aimed at that "hardware replacement" function.  IMO, they did a pretty good job at defining these.  For that application.

2) That particular "bare-metal" treatment of a microcontroller/board is NOT particularly compatible with layering "on top of" an operating system.  Or processors that are much faster than the AVR, for that matter.  (Even a 16MHz AVR can push the ability of normal "wire" in a max-rate pin-toggle loop.  Fortunately, the form factor used encourages short wires!)  (as an example, look at the problems that happened when HardwareSerial transmit became interrupt-based...)

3) We need a sort of "backward" OS, where the high-level functions (like SD-card file access) are handled in the background, while the user's code runs at approximately bare-metal levels of priority/non-interference/etc.

4) That's not the way most modern OSes work.  Certainly not Linux, which is clearly the natural choice for most of the "big" cpu configurations.

5) The "target market" isn't really big enough to support development of a custom operating system :-(
Pages: [1] 2 3 ... 452