Show Posts
Pages: 1 ... 5 6 [7] 8 9 ... 25
91  Using Arduino / Microcontrollers / Re: Repurposing main UART for other tasks? on: July 29, 2013, 07:56:19 pm

Actually I believe the 1284 has a third user interrupt pin INT2 on chip pin 3. Check the datasheet to verify.


Oh cr@p! Been working for 6 months with this chip and believed it only had 2, you are right, there's a 3rd one!!!
Thank you lefty!
Unfortunately I already made 100+ PCBs with that use INT1 for radio module smiley-sad
But as far as my original question, there's nothing that should prevent me from sharing UART1 with FTDI and another devices (i.e. upload sketch via FTDI, disconnect FTDI and connect GPS)? 
92  Using Arduino / Microcontrollers / Repurposing main UART for other tasks? on: July 29, 2013, 07:32:18 pm
I'm using ATMega1284p chip with Mighty bootloader.  It has 2 UARTs for serial communication.  I'm using 1st to program it via FTDI adapter, however is it possible to use this UART for other things, like communicating to GPS?
See the problem is I can't use second UART because it's physically same pins (16,17) as only 2 hardware interrupts (INT0, INT1) and I'm using at least one of them!  I can't believe Atmel did this smiley-sad

Anyway I still want to be able to use 1st UART for programming chip, I just want GPS connected to it as well and for some reason it's not working. I didn't figure out how to debug it since serial port is in use. Is there something, maybe a bootloader that might prevent me from using UART1 w/ GPS?
GPS works fine with UART2 btw.

Using things like SoftwareSerial also won't work, because it doesn't support ATMega1284p...
93  Using Arduino / Project Guidance / Programming and decoding universal remote IR codes on: July 24, 2013, 07:53:32 am
I got a bunch of cheap "keychain" remote controls off eBay (picture attached). They can be programmed by holding Mute button, which after about 3-5 seconds goes into search mode sending various IR codes for Mute function.  My goal is to program all remotes to a same code (doesn't really matter which as long as all of remotes sending same codes). I'm using Ken Sheriff's IRremote library for this.  However I'm yet to detect any noticeable pattern with it smiley-sad  It works if I use TV, but not reliably if I use Arduino.
I'm attaching Serial output generated when I held Mute button for about 1-2 minutes.  Any suggestions what logic I can use to program these remotes (other than using TV)?
Here's the code I'm using (it's slightly modified IRrecvDemo sketch that came with the library). I found that this code "20DF906F" for mute works with my TV so I've been searching for it in the output. I do find it occasionally but when I see it and release button, it doesn't always "stay in the remote"...  I wish I knew algorithm that remote uses for sending these codes...
#include <IRremote.h>

int RECV_PIN = 11;
byte i=0;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()
  irrecv.enableIRIn(); // Start the receiver

void loop() {
  if (irrecv.decode(&results)) {
    Serial.println(results.value, HEX);
    if (results.value==0x20DF906F) Serial.println ("*** FOUND 20DF906F ***");
    irrecv.resume(); // Receive the next value
    if (i==3) {
      Serial.println ("----------------------------------------------------");
94  Using Arduino / General Electronics / Re: Sourcing soft headphone cable on: July 16, 2013, 07:50:19 pm
Thanks! Sorry I didn't mention, I'm in USA.
I actually eventually found (more or less) what I was looking for.  There's wealth of info on forums, form there I found out that two brands make one of the best audio cables: Mogami and Canare.
Following that trail, I found two stores that sell them: and  I don't work for either one, just sharing info I found today smiley
Markertek seems to have tons of selection, while Redco just looks cleaner. I ordered several of different cables from both stores as well as some high quality 3.5mm plugs (Neutrik and Switchcraft seem to be all the rage). I'm actually buying a lot of DC panel jacks made by Switchcraft (on digikey) and they are excellent quality (a bit on expensive side tho).
Anyway I ordered these cables:
Mogami W2893 (has 4 multistranded conductors and shielded) which used a lot for DIY headphone cables and supposed to be ultra flexible.
Canare L-2B2AT (2 strands and shield). I chose this one solely on it's thickness, didn't see any reviews for it.
I also bough Mogami W2490 Ultraflexible Miniature Console Audio Cable to build IR blaster. I know it's an overkill cable for a simple IR diode, but I saw no cheaper alternatives. This cable is super thin too, so it would be perfect to hide in living room.
It might be useful for other Arduino projects where a durable flexible professionally looking wire is needed

I was actually surprised how difficult it was to find this information. No other site other than head-fi seem mention anything about DIY headphone cables. I hope this post will help someone smiley
95  Using Arduino / General Electronics / Sourcing soft headphone cable on: July 16, 2013, 09:25:03 am
Does anyone knows where I can get same kind of cable that's used in headphones, i.e. very easy to bend?  With 2 or more stranded conductors inside, doesn't have to be shielded...  Appreciate any suggestions smiley
96  Using Arduino / Project Guidance / Re: Best 1+ Watt amp IC that can run from 9 Volt battery? on: July 14, 2013, 04:22:41 pm
Wow, that's awesome amp! Anything similar in DIP package? 5v is also ok...
97  Using Arduino / Project Guidance / Best 1+ Watt amp IC that can run from 9 Volt battery? on: July 14, 2013, 03:38:51 pm
LM386 can only do 1/2Watt. Is there another IC that will let me amplify mono signal to 1 or more Watt (on 8ohm Speaker) while being powered by 9 Volt battery?
98  Using Arduino / Microcontrollers / Re: How to enable BOD fuse? on: July 03, 2013, 08:28:05 pm
Sorry, it was not clear you were using the bootloader to upload the sketch, since you had to use an ISP programmer to change the fuse bits.

For clarification are you using a custom bootloader to upload at 19200 baud?
Sorry I'm fairly new to AVRs... Are you saying that baud rate depends on type of Bootloader?
I'm using standard Sanguino bootloader with ATMega644p chip. It's a custom board I made so it doesn't have USB onboard. There are basically two ways I upload sketches to it, either by connecting FTDI adapter or uploading sketch to the 644p chip directly with my "Rapid bootloader shield" which basically sits on top Uno R3 and uses it as ISP programmer.  I found 19200 baud option in one example posted on Sparkfun so I'm using it and it works great.
I just find it quicker to upload a chipInfo sketch using Arduino as ISP (right after I burn bootloader), however I want to preserv ability to later upload sketches via FTDI.
I've programmed about ten 644p chips using avrdude with "-e" switch and while all of them appeared to be working, week later I found out that I cannot upload anything via FTID, which almost caused me to loose my mind smiley Then I realized problem was in the method that I was using to upload "test" sketch, it was erasing Bootloader in the process. I experimented with different avrdude switches. Only when I added -D switch I was able to upload sketch via ArduinoISP and keep bootloader intact. It didn't make a lot of sense to me first (since it "disables Erasing before programing"), but after your post I now closer to understanding why it works.
Anyway I got pretty far from my original post about fuses, but I just wanted to give warning to other newcomers who might stumble on this thread in search for answers smiley
I didn't test if setting fuse works with "-D" command, only did hex program upload.
99  Using Arduino / Microcontrollers / Re: How to enable BOD fuse? on: July 03, 2013, 07:44:40 pm

No this will not work correctly from ISP programming.  You will see it will not work once you change your program.  Try adding a line to you code and then re-upload it with that command again.  It will probably not work anymore.

The flash memory cannot be programmed to back to a "1" once it is programmed to a "0" unless you erase it.  The -D option only works with a bootloader because it does a page erase at a time instead to reprogram.  If you reprogram via ISP then the only way is to erase all flash first.

That was my point, this is supposed to work with Bootloader.
100  Using Arduino / Microcontrollers / Re: How to enable BOD fuse? on: July 03, 2013, 02:44:02 pm
I just realized that I can just use Arduino as ISP to program Fuses smiley
Since I created Rapid BootLoader shield, it's pretty easy to do it with that...
In case someone finds this useful:
avrdude -C S:\programs\arduino\hardware\tools\avr\etc\avrdude.conf -P COM11 -b 19200 -c avrisp -p atmega644p -v -e -U efuse:w:0xfd:m
I verified it works great. Just replace path to avrdude.conf and COM number to your environment smiley
HUGE WARNING to anyone who uses above command to actually upload HEX sketch to the chip!!!!
As I just discovered it erases Bootloader!  Apparently because of the "-e" switch and lack of "-D" switch.
If you interested in uploading sketch without loosing Bootloader use this command:
avrdude -C c:\programs\arduino\hardware\tools\avr\etc\avrdude.conf -patmega644p -cavrisp -P\\.\COM5 -b 19200 -D -Uflash:w:yourhexfile.hex:i
101  Using Arduino / General Electronics / Re: micro SD Card capacity variance on: June 30, 2013, 08:14:43 am
Thank you all!
BTW these cards format as FAT (I guess it's = FAT16) with SDFormatter utility.

Also I found out how to open these cards, all you need is some nitric acid smiley This is how it's done:
102  Using Arduino / General Electronics / Re: micro SD Card capacity variance on: June 28, 2013, 05:03:12 pm
Heh, how do you open micro SD?  It's as thin as paper :-)
103  Topics / E-Textiles and Craft / Which hot glue gun do you use/recommend? on: June 28, 2013, 02:28:24 pm
I'm using hot glue gun a lot lately, and it's a cheapo one. I'd like to upgrade to something better w/ features like on/off switch, very quick initial heating up and drip protection (if there's such thing). Any recommendations?
104  Using Arduino / General Electronics / micro SD Card capacity variance on: June 28, 2013, 12:43:53 pm
I'm very curious about something. I just bought 120 micro SD cards in size of 256Mb for my project. They are from various manufacturers. What is strange to me is that capacity varies from 240 to 243. How is this possible?  Some show up as 240, some 241, 242 or even 243 smiley
Dead cells?  Cards supposed to be new, and they look but I can't really tell for sure smiley
105  Using Arduino / Microcontrollers / Re: How to enable BOD fuse? on: June 22, 2013, 06:03:33 am

Only the lower 3 bits are programmable in the '328P extended fuse byte.
111 = no brownout detection (0xFF, or 0x07)
110 = 1.8V (0xFE or 0x06)
101 = 2.7V (0xFD or 0x05)
100 =  4.3V (0xFC of 0x04)
Oops it supposed to be "efuse:w:0xfd:m"
Pages: 1 ... 5 6 [7] 8 9 ... 25