Loading...
  Show Posts
Pages: [1] 2 3 ... 56
1  Using Arduino / Project Guidance / Re: How can I program Atmega328 in Arduino Mini Based on AVR Studio? on: Today at 11:36:08 am
You should be able to use that configuration in the photograph to program and communicate with the mini that is on the breadboard.  Is that correct, is it working for you?  If so, you should be able to now load ArduinoISP onto the mini and program ANOTHER mini or even a bare chip.  You can use ArduinoISP to load a bootloader onto the other chip and set the fuses on a new, blank chip.  But it would all probably be easier if you put your 328p back into the socket on the main board and follow one of the ArduinoISP tutorials.

Those signal descriptions you gave for the 10 pin connector sound like JTAG signals.
2  Using Arduino / Installation & Troubleshooting / Re: Problem in Arduino IDE (Very slow compilation process) on: Today at 11:19:31 am
Just out of curiosity, what kinds of CPUs do you have in your laptop and desktops?
3  Using Arduino / Networking, Protocols, and Devices / Re: caller ID on: May 20, 2013, 12:55:58 pm
You need to interface to a CMX602B.  The line interface is the most complicated part.
4  Using Arduino / Programming Questions / Re: Problem when changing pwm duty cycle Timer2 on: May 19, 2013, 10:50:15 pm
First off, I never advised you to use analogWrite() on any of this.  smiley  You can't really use that since you are modifying the timer control registers outside what the Arduino libraries expect. Here is some code that I wrote that generates a 25kHz Fast PWM signal on pin 3.

Code:
const int PWMPin = 3;
void setup() {
// generate 25kHz Fast PWM (mode 7) pulse rate on Pin 3
  pinMode(PWMPin, OUTPUT);   // OCR2B sets duty cycle
//  pinMode(11, OUTPUT);
// Set up Fast PWM on Pin 3
  TCCR2A = 0x23;     //0x23 COM2B1, WGM21, WGM20
// Set prescaler 
  TCCR2B = 0x0A;   //0x0A WGM22, prescaler = /8
// Set TOP and initialize duty cycle to zero(0)
  OCR2A = 79;    // 79 TOP DO NOT CHANGE, SETS PWM PULSE RATE TO 25KHZ
  OCR2B = 39;    // duty cycle for Pin 3 (0-79) generates 1 500nS pulse even when 0 :(
}

void loop() {
}

I did some playing around and sure enough, it only generates a 100% duty cycle output on DP11.  After reading the description of Fast PWM about 50 times, this is what I think is happening.  I didn't put a scope on it, but I'm betting that pin 11 has a narrow spike where it drops out when the TCNT2 register matches OCR2A and then goes high again on the next clock tick as the TCNT2 resets to 0. 

If you think about it, pin 11 is basically doing the same thing that pin 3 is doing.  It is going HIGH while 0<=TCNT2<=OCR2A (pin 3 cares about OCR2B).  When TCNT2 = OCR2A (TOP for both pins), I think the pin possibly drops for a clock tick then goes high again when TCNT2 resets to 0.  It's effectively a 100% duty cycle since OCR2A is also the same as TOP.

Like you, if I try using the toggle option I only get half the pwm rate and a locked 50% duty cycle.

If you are willing to live with inexact PWM rates, you can generate two different duty cycles on pin 3 and pin 11 by using Mode 3 Fast PWM.  In that case, TOP is 0xFF and OCR2A and OCR2B would determine the respective duty cycles of those pins.
5  Using Arduino / Programming Questions / Re: Problem when changing pwm duty cycle Timer2 on: May 18, 2013, 07:51:02 pm
Quote
So this line of code would have to be like this to be able to toggle (COM2Ax = 01) ?
Code:
TCCR2A = COM2A1 | _BV(COM2A0) | _BV(WGM21) | _BV(WGM20);

No need to reference COM2A0 since you want it to be 0 anyway.  You do need the _BV() doo-dad on the COM2A1 bit.  I haven't checked it out, buy since you are wanting to toggle the other pin, you may need to set OCR2B to the max value and OCR2A to the duty cycle.  In other words, it may be reversed.

Code:
TCCR2A = _BV(COM2A1) | _BV(WGM21) | _BV(WGM20);
6  Using Arduino / Programming Questions / Re: Problem when changing pwm duty cycle Timer2 on: May 18, 2013, 02:10:33 pm

The only thing I did, was replace COM2B1 by COM2A0 to enable pin11 instead of pin3.


Don't you think you should have used COM2A1 instead so that it would have toggled the pin?  smiley-wink  You have to manually set the pin to OUTPUT mode also.
7  Using Arduino / General Electronics / Re: Geezer electronics or a short history lesson... on: May 17, 2013, 01:29:10 pm
I was still using a mainframe with actual core memory in the early to mid 1980s.

Yeah, me too in the early 80's; Honeywell.

Cut my teeth on the Series 6000, DPS-8, etc., with the GCOS O/S. Took care of the FEP software for a while, NPS mostly. Did some custom stuff and extensions. Getting dissimilar machines to communicate was quite a challenge back then. Come to think of it, getting similar machines to talk wasn't much easier.

I wrote COBOL and GMAP for a few years then switched to all assembler and systems programming.  I wrote some kind of cheesy comm adapter to get SNA and CICS to talk to each other if I recall correctly, it involved a Level 6 but my code ran on the mainframe.  Wrote tons of GMAP for a software company you probably know of since there weren't that many third party systems software vendors for Honeywell.  We did a Tape Management System, a file utility package and a production job scheduler amongst some other things.  I wrote some filsys modifications to add some features to MME GEFSYE that GE left out.  Fun stuff, I really miss GCOS.




8  Using Arduino / Project Guidance / Re: How i can Get between 20khz-25khz pwm frequency on: May 17, 2013, 10:10:30 am
This will generate a 25kHz PWM signal with 80 steps of resolution.  This uses Timer2.
http://forum.arduino.cc/index.php?topic=155089.msg1176136#msg1176136
Further down the page you can see how I measured the RPM of the 4-wire PC fan.
9  Using Arduino / General Electronics / Re: Geezer electronics or a short history lesson... on: May 17, 2013, 07:56:17 am
I was still using a mainframe with actual core memory in the early to mid 1980s.

Yeah, me too in the early 80's; Honeywell.
10  Using Arduino / Networking, Protocols, and Devices / Re: EEPROM 24C32 on: May 17, 2013, 05:25:14 am
Why a .RAR file?  Anyway, you just do it like this page shows:
http://playground.arduino.cc/code/I2CEEPROM

Your device address is 0x50 since A0, A1 and A2 are grounded according to the schematic you posted.
11  Using Arduino / Sensors / Re: IR emitter issues on: May 16, 2013, 09:15:04 am
Thank you! Any idea how i can figure out the right frequency for the device when i'm receiving its IR signal?

Much appreciated

You can't use a complete receiver module because it will filter the carrier out.  You would need to use a phototransistor or photodiode to "see" the raw signal modulation.  What happens when you try the IRrecvDump example of the IRemote library?  You may have to download it if you don't already have it.  Some remotes send several different strings back-to-back to try and hit as many devices as possible, or they have really long transmissions that have too many bits for the library to handle properly.  You might need to modify two or three buffer sizes in the library to make it handle your remote.  I have that problem here when I try to read my u-verse remote.  I haven't found time to fix it yet, so I just use an older Sony remote that works for now.  I think somebody recently made a nice clear post about what needed changing to make the library handle the longer strings.

12  Using Arduino / Microcontrollers / Re: Upload hex to a PIC16F628 on: May 16, 2013, 04:31:50 am

The shield is on a breadboard and resembles that of the diagram except the ICSP header is excluded and 12V is applied to Q1, rather than 13V (an extra volt can be found if necessary). Since the 16F628 has 18 pins, D2 is connected to pin 14 on the PIC.

That would be enough to prevent the chip from entering programming mode, in my opinion.
13  Using Arduino / Microcontrollers / Re: ATtiny85 w/ tiny-core and serial write on: May 16, 2013, 02:08:36 am
The standard is very old so it calls for higher voltages and even expects negative voltages.  I believe that the standard only demands a +5V to -5V swing on the signal for it to be considered acceptable.  Still many modern devices will accept +5V and 0V as valid inputs as Fungus says, though they really aren't to spec and they will still require the polarity inversion
14  Using Arduino / Microcontrollers / Re: UNO & ATMega328 with internal clock on: May 15, 2013, 03:39:21 pm
avrdude has an interactive mode you might want to play around with.  I think you just add -t.
15  Using Arduino / Microcontrollers / Re: UNO & ATMega328 with internal clock on: May 15, 2013, 02:48:02 pm
Try "arduino" instead of stk500v1 as the programmer type.
Pages: [1] 2 3 ... 56