Show Posts
Pages: 1 [2] 3 4 5
16  Forum 2005-2010 (read only) / Troubleshooting / Re: Need Bluetooth for Arduino on: October 12, 2006, 05:53:26 am
it should be allways bossible to meassure a voltage on a serial port TXD ping. If I remember right, Rs232 TXD level should be stable -9 to -12 volt when idle (i.e. nothing to do), a TTL TXD pin, + 5 Volt (hence the polarity difference). With 9-pin Sub-D connector you can meassure against ground on pin 5.
If you want to check whether your arduino mini usb works you can just connect a cable between TXD and RXD (a hardware loop smiley, use a terminal programm and check if you can see all characters you send ("software local echo" should be off...) If that works you can look at the esd002 module. You can listen with the terminal on the arduino mini and connect the bluetooth device with your system, in standard config it should allways send some confirmation messages like "ERROR" or "CONNECT xxxx" to serial pins . For me the module works like a charm now. To actually use it for programming arduino, I finally just had to disable these confimartion messages. In my config program, this option is called like "signals off" or "disable at commands". And, of course, the modules's baudrate must be set to arduinos download_rate, which is 19200bd by default. Oh and try switching the RXD/TXD pins, it won't damage anything and you may have interchanged them (I did... many times smiley-wink.
The only drawback is, I still have to press reset before programming. I wanted to use the RTS line for that, but it seems my BT module offers that only for hardware flow control...

will the arduino BT module allow to use RTS, CTS etc. lines directly? So that they can be used for other purposes than hardware flow control? I have the bad feeling, that direct acces to these pins is maybe not within the bluetooh serial port protocol specs.... so no BT module would allow this.... right?

17  Forum 2005-2010 (read only) / Troubleshooting / Re: Need Bluetooth for Arduino on: October 11, 2006, 02:30:54 pm
Hi andre,

the wring of the module looks right. But your drawing shows a Serial Sub-D 9-pin connector. Are you really connecting to one of those? If yes, you have the wrong voltage range! A serial RS-232 interface with Sub-D conenctor usually has +/- 9 or  12 voltage swing! What the module expects at its TXD and RXD pins is only TTL level, which is between 0 and 5 Volts (even 5 Volt is not really within the maximum ratings of the modules datasheet but I accidently tried it instead of 3,3v and nothing burned... so it even seems to work save with 5 volt on the module's RXD pin).

You should really measure the TXD voltage on your Searial port, that is pin 3, as you showed right in your drawing.
Maybe, you can open your serial adapter and connect the wires before the chip that does TTL-to-RS232 level shifting (there usually is one) but it may be easier to buy a usb-to-serial adpater witch allready as TTL levels. Like Arduino Mini usb
If you have real bad luck, you may have bruned the bleutooth module's RXD pin with the too high voltage, but that's just speculation...

18  Forum 2005-2010 (read only) / Troubleshooting / Re: Need Bluetooth for Arduino on: September 27, 2006, 09:57:59 am
I'm using the tiny Promi ESD 2 Bluetooth module, too (for around 50 euro at You definitelly have to use the configure software PromiWin to set it up. With PromiWin, I switched it to Mode 3, set a passphrase and could connect easily with my mac's bluetooth assistant. (Btw, PromiWin runs nicely with parallels on a mac and the usb cable im using smiley To set up, I didn't use the developer board! It's just a RS-232 level converter anyways. I connected a usb-to-serial chip's (silabs cp2102) txd and rxd with the corresponding pins on the module, pulled the module /reset pin high with 10kohm and supplied the module with 3.3V. That last part is critical, don't use Arduino's 5 Volt! And be shure you dont connect a 5V level TXD signal with the module's RXD ping. Its only 3,3V compatible (my usb-to-serial chip allready has 3,3V levels).
So far I got serial connections running over bluetooth with arduino but can't program over bluetooth, i'm still investigating on that....

19  Forum 2005-2010 (read only) / Troubleshooting / Re: Can't program firmware on: March 15, 2006, 04:17:55 pm
you just need this in your avrdude.conf, for the "dapa" programmer (the one from adruino webpage)
Since avrdude version 5, it's allready included.

  id = "dapa";
  desc = "Direct AVR Parallel Access cable";
  type = par;
  vcc   = 3;
  reset = 16;
  sck = 1;
  mosi = 2;
  miso = 11;

did uisp finally work with the XP_stop_polling.reg patch?
20  Forum 2005-2010 (read only) / Troubleshooting / Re: Can't program firmware on: March 13, 2006, 01:17:28 pm
many thanks for the insights!

I allready visited preferences.txt to set the clock speed of my board :-) I'm currently using this board:
But it's so tiny and well done that I will post a whole thread about it :-)
Somehow I didn't really notice build.mcu=atmega8. That's great! I mean, can we allready just use other AVRs? Well, I guess, only if one won't use timers etc. I will check this with my atmega128 board as soon as I get it back from a friend.

Just the next feaure request: To use different boards with different hardware side by side, it would be required to store hardware preferences like the board clock etc. in the sketch file itself...

I mailed massimo some weeks ago about helping with developing, as he called for it on the webpage. I'm still interested in taking part of arduino development.
I noticed F_CPU is not really beeing used everywhere (delaymicrseconds() etc.). I'll focus on getting arduino clock indepent for a start, as I need it anyways (I'm running on 14,7456Mhz)

21  Forum 2005-2010 (read only) / Troubleshooting / Re: Can't program firmware on: March 13, 2006, 08:23:18 am
well, I only had to edit the config file because I had to add a certain programmer type. (I think that it's actually a big pro for avrdude, that you can do that so easily...)
the flashing parameters itself are assignable on commandline, just like with uisp! see my commands above.

I didn't look at arduinos internal IDE structure so far, So, if you aren't allready using this approach, you could invoke the whole flashing process via a makefile. Thus one could change the actuall flash procedure inside there. (I think only advanced users would want to do that anyways)

One more thing: ;-)
I would be very happy, if the arduino IDE could be used as all full avr-gcc IDE, too.
For example, I tried to compile the ATmegaBOOT.c bootloader source inside arduino IDE and it didn't work. (it complained about the "union" statement beeing unknown etc..) I've a board with a different clock, so I had to do this. I ended up instaling the whole avr-gcc and avr-binutils by hand, which was anoying (under mac  OS X) - just to compile a new bootloader.

I really like arduinos approach of doing things simple (setup(), loop() etc.), but as avr-gcc is behind it, I think it would be a big benefit to offer the wohle power inside the smart arduino IDE.
Maybe someone could document the way arduino/wiring works. So far I think of it like a wrapper for avr-gcc, but I'd like to have more insight or some tips where to look at and start to understand the backend. (e.g. im still wondering how I could add a real library)

22  Forum 2005-2010 (read only) / Troubleshooting / Re: Can't program firmware on: March 12, 2006, 07:48:35 pm
Use avrdude!
At first I tried uisp, too. It allways pretended to find the hardware, when it actually wasn't! I think I turned on the debug/verbose messages to notice that...

When you have avrdude installed, you just need to execude the following 2 lines:
avrdude -c dapa -p m8 -P LPT1 -U hfuse:w:0xca:m -U lfuse:w:0xdf:m
avrdude -c dapa -p m8 -P LPT1 -U flash:w:ATMegaBOOT.hex

That are the settings for standard 16Mhz board clock and the simple parallel programmer from ardunio webpage, called "dapa" in avrdude since version 5. I you want to use the older binary version for windows, I can give you the additional settings for the avrdude config file.

One other thing, I had to do on Windows XP (my mac has no LPT smiley, was to disable the "LPT autocheck" windows "feature". There's a registry file (.reg, use google) which simply disables regular polling of the printer ports, what would interrupt and brake up the programming event!
This problem really drove me nuts! Stupid, f***ing M$ smiley-wink - who needs LPT autocheck every some seconds?
Maybe that's the reason why uisp didn't work for me, but I didn't verify it, I just went with avrdude and I'm happy.
This is something important for the FAQ and bootloader instructions, I think! Are any arduino developers listening?

While we're at it: Why is no avrdude instead of uisp in the arduino package? Avrdude is much more actively developed and mature than uisp. And there are actually rumors, that the uisp developer recommends avrdude over uisp himself...

23  Forum 2005-2010 (read only) / Troubleshooting / Re: PWM2 (Digital Pin11) on: March 08, 2006, 11:35:31 am
Hi beltran,

from what I can say all your assumptions are right.
Generally the whole memory of a micro/processor can be called "the registers". The SFRs are in that way "special function" regsiters, that they control a certain setting in a micro and cannot be used as programm storage (flash) or RAM.
So, like you suggested, they can be seen as nothing else but simple preferences.
SBI, CBI and _SFR_BYTE are so called preprocessor macros. The DMX Master example could have also used the sbi() and cbi() macros instead of using _SFR_BYTE directly. _SFR_BYTE simply applies an Offset (+ 0x20 !) to a register number (like e.g. TCCR2). The actual reason fot that, I dont know.
But what all 3 macros are used for,  is setting/unsetting a certain bit in a certain (special function) register - again just like you guessed! :-)

You should take a closer look at "bit manipulation" and the logical operators in C. It's not that hard, really! It will be a big benefit for understanding micros in all.
Shiffting (like 1<< WGM21) is necessary because C has no binary variable type.
Usually, to simplify things, SFRs and their Bits are defined with just the same decimal value like in the datasheet of the micro (as you found in /tools/avr/avr/include/avr/iom8.h).

For all german language aware people I can recommend this very good tutorial about bit toggling:
(maybe you can translate it with google)

24  Forum 2005-2010 (read only) / Development / Re: BBB is now "Diecimilia ready" on: September 10, 2007, 03:26:28 pm
Hey limor, hi david!
I'm sorry that I caused confusion! It looks like I got fooled in thinking DTR was toggled, when it obviously was only because of the serial port opening. It just made so much sense to me, that the "reset" variable should also be parsed by avrdude when doing stk500. Bad coincidence...
But I can at least report, that auto-reset also works with a non FTDI chip, the CP2102 from silabs also does a nice DTR line toggle when the serial port gets opened - at least under Mac OS X.
I'll test both usb-serial chips with avrdude and a small serial port toggling python script under all three OSes soon.
I hope this will clarify the issues...
25  Forum 2005-2010 (read only) / Development / Re: BBB is now "Diecimilia ready" on: September 09, 2007, 06:06:29 pm
But I would prefer keeping the reset functionality out of java and the IDE if possible.
If avrdude is capable of doing it, let it toggle the reset, as it's actually a part of the uploading process. And it's much more flexible regarding user changes.

I've the same feeling here as with using makefiles in the background...
I'm a sucker for modularity. Long live UNIX style: small tools, one for each domain, entity or  problem smiley

26  Forum 2005-2010 (read only) / Development / Re: BBB is now "Diecimilia ready" on: September 09, 2007, 05:25:49 pm
you can tell avrdude directly to toogle a line before uploading. I expllained it here and used it in a makfile wich is linked.

you simply add a section like this to $ARUINO_DIR/tools/avr/etc/avrdude.conf:
  id    = "arduino";
  desc  = "Arduino Serial Bootloader";
  type  =  stk500;
  reset = 7;

In the avrdude.conf is a SUB-D RS-232 connector pin mapping which shows RTS is pin 7 (hence reset = 7).
Well, after seeing this again, I may have done something wrong, as I initially wanted to toogle DTR (which is pin 4!) but it worked with the setting above!
I've to look at the board again - I probably soldered the wire to one FTDI pin aside or something smiley-wink ...
But it should work in general, as it toggles a reset on my trusty Arduino Extreme/USB boards.

Or maybe the reset does come allways from the general serial port opening? I'm too lazy now to pull my scope from the shelf...
Mellis, what did you find out with avrdude and reset?

p.s. to use this new avrdude option, preferences.txt (or the makefile smiley must read upload.programmer=arduino of course
27  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Arduino dock on: June 30, 2006, 07:28:59 pm
hey, nice!
the small smd arduino looks like this Atmega8 board:
I allready used them with arduino, worked like a charm (only the clockspeed is different, so I changed the bootloader).
I'm currently in the hassel to swap that f'ing small MLF Atmega chip because I burned one... it's quite smaller than the TQFP version allready is.

Also check out the littleUSB board on the same site. a super small micro-USB to serial adapter in DIL16 package!
That would be a nice "dock" for arduino. I'm allready using like this for my custom arduino based 8x8 matrix module. But so far I could'nt find a bluetooth module with the same footprint. smiley-sad That would be really nice! Only this similar small one:

Are you going "software USB"/HID (AVR USB) for future arduinos? Like some suggestion I found via make's electro blog.
28  Forum 2005-2010 (read only) / Workshops / how about regular meetings? (me: munich, germany) on: November 29, 2005, 12:18:35 am
Hi all,

i'm quite new to arduino but something tells me this project attracts a really nice community.
So why exploring everything alone?
How about regular, local and casual meetings? (like a "regulars' table", anyone know german "choastreffs" of the Caos Computer Club?)
For discussions around arduino/wiring/processing, hardware hacking etc. with design freaks, mac heads, linux nerds or just open minded people beeing obsessed by interaction and technology?
Anyone intrested?
I'm living in Munich, Germany (Bavaria).

So long,
29  Forum 2005-2010 (read only) / Workshops / Re: FREE CAMP IN LINZ - Ars Electronica on: June 14, 2006, 11:04:40 am
Great! I will hack with you all day long in linz :-)

30  Forum 2005-2010 (read only) / Exhibition / Re: Arduino Pong on: September 10, 2007, 06:56:40 pm
I looked around for a TV test-pattern an found this very simple and clean one:

Its done on an ardunio board, but supprisingly not compiled within the IDE, so I changed the code
to run in Arduino 0009. I also changed it to support the same circuit and pins that Al uses in arduino pong.
So video out is still generated on digital pin 8+9.

Now, I can see 3 nice vertical bars, which tells me that the ghost pictures I get from the arduino
pong code is probably not a hardware issue of my circuit or beamer...
Although the ghost pictures I see in pong are all exactly vertically shifted... maybe I just don't see them in
the 3 vertical bars pattern?

Anyways, I think this code is a good test! And maybe an even better starting point for proper
video generation. It also looks like the _delay_us()  function is more accurate than delayMicroseconds...
When I've time and muse to pull that clunky scope from my shelf, I'll compare the signal patterns of this 3 bar test and arduino pong. :-)

   Vertical Bars Pattern PAL TV Signal Generator with Arduino
   Use this code as you want
   2007 Javier Valcarce Garcia, <>
   copied from
   This pattern should work on PAL and NTSC TV sets, as mentioned on the webpage.
   It's slightly changed to compile inside the standard Arduino IDE (Version 0009)
   Note that the left and right bar are usually not exact the same size, as
   there are slight offsets in most TVs.
   See reference:
     2007.09.11 Oliver Keller <>
// yes, ther is an avrlibc inside arduino...
#include <util/delay.h>
// Pins where the 2-bit DAC is connected, this is the composite video-out ;)
// PINB0 is DigitalPin 8, PINB1 is DigitalPin 9
#define PINB0 0 // LSB, 1 kOhm resistor
#define PINB1 1 // MSB, 330 Ohm resistor
// 0     0     0.0V   - Sync level
// 0     1     0.3V   - Black level
// 1     0     0.6V   - Gray level
// 1     1     1.0V   - White level
#define LEVEL_SYNC   PORTB &= ~(1 << PINB1); PORTB &= ~(1 << PINB0);
#define LEVEL_BLACK  PORTB &= ~(1 << PINB1); PORTB |=   1 << PINB0;
#define LEVEL_GRAY   PORTB |=   1 << PINB1;  PORTB &= ~(1 << PINB0);
#define LEVEL_WHITE  PORTB |=   1 << PINB1;  PORTB |=   1 << PINB0;
inline void vsync_pulse()
inline void equal_pulse()
inline void hsync_pulse()
      _delay_us(5); //4.7us
      _delay_us(7); //7.3us
       unsigned int line = 0;
void setup()


      DDRB = 0xFF; // PORTB, all pins are outputs

void loop()
          if (line == 626)
              line = 1;
          case 1:
          case 2:
          case 314:
          case 315:
          case 3:
          case 4:
          case 5:
          case 311:
          case 312:
          case 316:
          case 317:
          case 623:
          case 624:
          case 625:  
          case 313:
              // Image scanline (not a sync line)
              hsync_pulse(); // Horizontal Sync, lenght = 12us                 
              //52us in total

Note the code works on ATmega168 as well as on ATmega8 arduino boards. Its even smaller than the arduino bootloader (1k) smiley
Pages: 1 [2] 3 4 5