Loading...
  Show Posts
Pages: [1] 2 3 ... 60
1  Using Arduino / General Electronics / Re: How Often do Electronic Components Stop Working? on: May 24, 2013, 07:18:12 pm
Electronics is Math.

Isn't mostly everything?



Nothing is math.  Math is simply a tool for describing all sorts of things.  Electrons behave in a way that we call mathematical for no known reason, it's just the way they are and it's just good luck that they do.  They would still behave that way if there were no intelligent creatures to devise a mathematical description of their behavior.
2  Using Arduino / General Electronics / Re: Determining right way to drive a polarized speaker. on: May 24, 2013, 06:26:45 pm
Yes, that all makes sense.  Thank you both.
3  Using Arduino / General Electronics / Determining right way to drive a polarized speaker. on: May 24, 2013, 06:08:42 pm
I did a little project out of Make: Electronics that uses a TEA2025B to create a small mono audio frequency amp.  I have what appears to be a polarized speaker, one input is marked with a dot of red and I am taking that by convention that means the speaker is polarized and that is the positive input.  The project and the datasheet for the TEA2025B don't really say how to hook up the speaker.  It works either way.  The datasheet gives the outputs as OUT1 and OUT2 and never mentions which one goes to the positive input of the speaker.  How do I determine this?  Does it matter?

Datasheet: http://www.mouser.com/ds/2/389/CD00000172-76579.pdf

Project schematic.

4  Products / Arduino Due / Re: Port manipulation PINx commands with Arduino Due ? on: May 20, 2013, 12:13:44 am
Code:
void loop() {
  for(;;){
    digitalWriteDirect(9, HIGH);           
    digitalWriteDirect(9, LOW);   
    digitalWriteDirect(9, HIGH);           
    digitalWriteDirect(9, LOW);   
    digitalWriteDirect(9, HIGH);           
    digitalWriteDirect(9, LOW);   
... repeat many times      
  }
}

Even with the tighter loop the square wave will be uneven because of the looping overhead of 3 or 4 machine cycles.  You can cheat by repeating that block of code a bunch of times (feel free to hold ctrl-v down and paste it in a few hundred times).  The more there is before the eventual hiccup, the better chance your scope will have at stabilizing the wave.
5  Products / Arduino Due / Re: Need A Hint For Atmel Studio 6 + SAM3S3B on: May 14, 2013, 01:12:15 am
OK, I figured it out.  I made another board with a SAM3X8E and it exhibits the same behavior.  It seems all the Atmel ARM chips have a watchdog timer enabled by default and it trips and resets the uC when it hasn't been reset for about 12 seconds, by default.  To get around it, either reset it periodically or disable it.  I don't know how you do this directly with the registers, but if you are using ASF the function calls are:

wdt_restart( WDT );

or

wdt_disable( WDT );

The Watchdog functions have to be included using the ASF Wizard.
6  Using Arduino / Microcontrollers / Re: [solved]Is AT89 Microcontrollers support in Arduino? on: May 12, 2013, 02:05:26 pm
Looks like the Kim-1 might have beat the PET by a smidgen.
http://en.wikipedia.org/wiki/Commodore_PET

I remember the PET, but it just didn't catch on for some reason.  They really pushed the keyboard entry graphics characters that were also on the Vic-20 and C-64.  The C-64 was truly awesome hardware, but the "OS" or firmware or BASIC shell or whatever you want to call it really blew chunks.  No commands to make even the most rudimentary use of the graphics or sound hardware.  That and the total lack of documentation kept it from really taking off in my opinion.  The serial hardware interface was kinda cheesy too.

I still have a Jumpman Jr cartridge somewhere.  Kind like lode runner.

Back in the early 80s there was a user's group that met at Saturdays at a local community college for these things.  I went to the Atari one instead.  The PETs were sort of stodgy, like the TRS-80 computers.  Atari 800 / Apple II / C64 was the place to be.  smiley
7  Using Arduino / Microcontrollers / Re: Is AT89 Microcontrollers support in Arduino? on: May 12, 2013, 02:05:59 am
looks promising...

It turns out, the tool that I linked works just fine (http://en.wikipedia.org/wiki/MCU_8051_IDE).  I got a few of these chips from a cheap eBay dealer for slightly less than Digikey and got it to work no problem tonight after doing some searches on the Interwebs.  The basic process is write your code, compile it in the 8051 MCU IDE that I linked above, use just about any (e)(e)PROM programmer like my ChipMax 2 (and there are many cheap ones that would work fine) to send up the resulting .HEX file, and use the chip. There is no debugger or ICE for this, you have to move the chip to the programmer and back, but it's quite easy.  Here is the project and my code.  It's simply doing an inverted Night Rider LED animation for the time being.

Code:
; Program initialization
; --------------------
org 0h
sjmp start

delay: MOV R2, #200
outer: MOV R3, #250
inner: NOP
NOP
DJNZ R3, inner
DJNZ R2, outer
RET
 
; Program start
; --------------------
start:
MOV P3, 0 ; enable LEDs 0-5
CLR P1.2 ; enable LED 6
CLR P1.3 ; enable LED 7

loop: SETB P3.4 ; disable LED 4
LCALL delay
CLR P3.4 ; enable LED 4

SETB P3.5 ; disable LED 5
SETB P3.3 ; disable LED 3
LCALL delay
CLR P3.5 ; enable LED 5
CLR P3.3 ; enable LED 3

SETB P3.7 ; disable LED 6
SETB P3.2 ; disable LED 2
LCALL delay
CLR P3.7 ; enable LED 5
CLR P3.2 ; enable LED 4

SETB P1.2 ; disable LED 7
SETB P3.1 ; disable LED 1
LCALL delay
CLR P1.2 ; enable LED 7
CLR P3.1 ; enable LED 1

SETB P1.3 ; disable LED 8
SETB P3.0 ; disable LED 0
LCALL delay
CLR P1.3 ; enable LED 8
CLR P3.0 ; enable LED 0

; circle back

SETB P1.2 ; disable LED 7
SETB P3.1 ; disable LED 1
LCALL delay
CLR P1.2 ; enable LED 7
CLR P3.1 ; enable LED 1

SETB P3.7 ; disable LED 6
SETB P3.2 ; disable LED 2
LCALL delay
CLR P3.7 ; enable LED 6
CLR P3.2 ; enable LED 2

SETB P3.5 ; disable LED 5
SETB P3.3 ; disable LED 3
LCALL delay
CLR P3.5 ; enable LED 5
CLR P3.3 ; enable LED 3

sjmp loop
END
8  Using Arduino / General Electronics / Re: Who do Arduinos with USB microcontrollers need a separate USB chip to program? on: May 10, 2013, 12:17:11 pm
This is a great explanation, thank you for taking the time.
9  Using Arduino / General Electronics / Who do Arduinos with USB microcontrollers need a separate USB chip to program? on: May 09, 2013, 11:58:48 pm
I can understand why the Arduino Uno R3 (ATMega328P) and Arduino Mega (ATMega2560) need a separate USB chip to allow for programming and I get why Atmel is now used instead of FTDI.  What I don't understand is why boards like Arduino Leonardo (ATMega32U4) and Arduino Due (ATSAM3X8) need another Atmel chip to run the USB, both of these microcontrollers are USB capable.  The Leonardo, in fact, has two ATMega32U4s, one as the main controller and one as the USB bridge.  What is the limitation that requires that the bootloader run off of a separate USB bridge instead of the local one?

Just wondering.  Thank you.
10  Community / Bar Sport / Re: Arduino based replicator on: May 09, 2013, 08:29:38 pm
Yep, I was the one being political.   smiley-roll-blue

Yes, that changes -everything- you wrote.



Everything?  All I wrote, which was maybe 10% of what you have written so far, was an economic argument that the healthcare law, as written, is flawed for economic reasons, and we will see it start failing spectacularly, for economic reasons, within the next two years or so.  I didn't even debate it's political or moral dimensions.  I understand societally that we want to provide health care for all citizens.  It's just not going to work real well if the insurance companies are still the ones funding everything and we drive them out of business.
11  Using Arduino / Microcontrollers / Re: ATtiny 1634 support? on: May 09, 2013, 03:30:08 am
I have bought too some of these chips and I don't succeed to get communication with Atmel AVR Studio 6 over ISP6 with JTAGICE3. Do they need external crystal for startup or anything else ?


Here is my test rig.  It's set up like a normal AVR on a breadboard or solderboard and I don't have an oscillator and it's working fine.  It's just doing one of four Knight Rider style LED animations based on a left button, right button is reset.  I set it up to prove to myself I could get this thing programmed, not to prove I could use every feature on it.  My programmer for this was a AVRISP mkII.

12  Community / Bar Sport / Re: Arduino based replicator on: May 09, 2013, 03:22:06 am
Yep, I was the one being political.   smiley-roll-blue
13  Using Arduino / General Electronics / Re: CY7C68013A-56 EZ-USB Logic Analyzer...? on: May 07, 2013, 02:25:37 pm
I don't think there is any firmware, or anything to reverse engineer.  I've seen quite a few products sold as saleae logic analyzers that could double as a usbee logic analyzer.  Switching between the two was supposedly just a matter of changing the device id on an eeprom chip on the back of the board via usb, and most were being sold for $5 - $10.  For that price, they probably didn't put much effort into it.

Has anyone who has one of these tried using it with open source logic analyzer software like the OLS client?  If it can be used legally, it might be a pretty useful little device!

The concept of using a microcontroller and not having firmware is novel.  Please explain how this would be done in more detail...
14  Using Arduino / General Electronics / Re: DAC in arduino DUE on: May 06, 2013, 09:30:59 am
Yes, but be very careful what you connect it to, a lot of us have accidentally burned ours.

The opamp suggestion from tmd3 is a good suggestion, without this or a similar buffer between the DAC and your load, your DAC might not last very long - mine didn't

Duane B
rcarduino.blogspot.com



The easiest way to protect a pin is to put a resistor on it so it cannot source too much current.  Whatever the maximum safe current is for that pin, place a resistor in series with it that limits the current to something less than that.
15  Using Arduino / General Electronics / Re: CY7C68013A-56 EZ-USB Logic Analyzer...? on: May 06, 2013, 09:19:39 am
I seriously doubt even the old version of the Saleae Logic software is legally licensed by these guys.  They cloned the Saleae Logic hardware (they are using the exact same chip) and stole the software.

The technically didn't steal the software as it is/was available as a free download from Saleae but they are most certainly not allowed to redistribute the software so I agree with you.

I wonder how they went about cloning the features on the CY7C68013A-56 itself.  That's the same chip Saleae uses.  That implies to me they stole the firmware too.  Now if they reversed engineered the hardware itself (perhaps using the logic analyzer on itself) and reimplemented it, that would be the proper way to do it.  I bet they didn't - the fact it's the exact same microcontroller would allow them to take the shortcut of possibly ripping the firmware and I bet that is what they did.
Pages: [1] 2 3 ... 60