Show Posts
Pages: 1 ... 61 62 [63] 64 65 ... 74
931  Development / Suggestions for the Arduino Project / Links to Documentstion thast can only be found in a search on: February 17, 2012, 06:21:22 pm
I have seen several pages on Arduino functions that I am unable to get to except by searching.

Like this page -
http://arduino.cc/en/Reference/PortManipulation

which has the title "Port Registers"

I have been to another page through  a similar method.

What other pages are there on the Arduino site that have similar info, but no links from the Reference secton?
932  Using Arduino / Motors, Mechanics, and Power / Re: Stepper motor - was working great - strange problem now on: February 17, 2012, 02:11:26 pm
You have something mis-wired. If you were turning on ANY phase of the motor the motor would hold that position. since the motor has no torque it is not getting any power, thus it has no torque.

Got a voltmeter?
933  Development / Suggestions for the Arduino Project / Re: Arduino IDE Bug? on: February 17, 2012, 02:07:03 pm
Nope - Not seen that.
934  Using Arduino / Installation & Troubleshooting / Re: Can't use special symbols on the Arduino IDE on: February 17, 2012, 01:55:05 pm
What exactly are you trying to do?
935  Development / Suggestions for the Arduino Project / Re: Writing serial monitor to file on: February 16, 2012, 06:17:53 pm
Hyperterminal has this capability and shouldn't be to hard to get, if it didn't come already installed.

If not - You can Highlight Text in the Monitor window and Paste it into Wordpad and save it from there.
936  Using Arduino / Motors, Mechanics, and Power / Re: How to release stepper motor on: February 16, 2012, 05:15:06 pm
Depending on how you driver is wired - you could put a transistor parallel to a resistor on the voltage supply to your driver and turn the transistor on when you are moving and turn it off when you are stopped. The resistor would have to be sized for both the holding current and for the heat it would have to get rid of.  You would need a high wattage resistor.
937  Using Arduino / Project Guidance / Re: arduino and ham radio beacon on: February 16, 2012, 04:55:58 pm
Does that radio have an AM mode? Does the radio key fast enough that you could use an unmodulated AM carrier for yur beacon? (That's all CW is anyway.)

Problem with either method is going to be getting a proper impedance match between the Arduino Audio and the Radio Audio. A capacitor might do, or you might need a small audio transformer to isolate them.

Finfd out how much (or how little) current you are switching in teh PTT circuit. You might be able to get away with something as simple as a 2N2222.
938  Using Arduino / Microcontrollers / Re: possible to "tune" a resonator? on: February 15, 2012, 01:48:10 pm
By playing with the values of the capacitors you can alter the frequency of the crystal circuit. You can't make large changes, but you can "trim" it if more accuracy is needed.
939  Using Arduino / General Electronics / Re: power still on when removing the usb on: February 15, 2012, 01:42:21 pm
Okay -
by
Quote
the board has a 12v external power connector which i have hooked up to my power supply. 
do yu mean that you connected the 12V supply for the external realy card to the power supply input on the Arduino board? If so, that is what that connector is for and 12V will work fine in this application. The regulator on the Arduino board might warm up a bit, but it is just doing its job.
940  Using Arduino / Installation & Troubleshooting / Re: bootloading raw 328 on: February 15, 2012, 01:25:58 pm
It works, I have used the ArduinoISP(loaded under Arduino-0.22) to program ATMega328's and ATtiny2313A's.

Make sure you have all the correct connections, the device 00 00 00 sounds like you are missing power to the device to be programmed.

Are both devices tied to a common ground?

Do you have Crystal or Resonator connected to the chip you wish to program?

You can type something like this from the command line to check your programming connections -
avrdude -P comport -b 19200 -c arduino -p m328 -v

Just change the comport to com4 or com9 or whatever comport yours shows up as.

I had to program using AVRDude because my chip was a 328 and not a 328P
941  Using Arduino / Motors, Mechanics, and Power / Re: Arduino chip as Stepper Controller on: February 14, 2012, 10:00:23 pm
I got it working -

Figured out what was lacking in my assembly code and now it works.

Code:
.NoList
.INCLUDE "tn2313Adef.inc" ; Header for ATTINY2313A
.List
; ============================================
;   R E G I S T E R   D E F I N I T I O N S
; ============================================
.DEF Conf = R16 ; Multipurpose register
.DEF StepCt = R17
.DEF StepMask = R18
.DEF Direction = R19
.DEF PortBHold = R20
.DEF PortDHold = R21
.DEF PortDMask8 = R22
.DEF SeqBase = R24
; ============================================
;       S R A M   D E F I N I T I O N S
; ============================================
.DSEG
.ORG  0X0060
; ============================================
;   R E S E T   A N D   I N T   V E C T O R S
; ============================================
.CSEG
.ORG $0000
rjmp Main ; Reset vector
rjmp Step ; Int vector 1
reti ; Int vector 2
reti ; Int vector 3
reti ; Int vector 4
reti ; Int vector 5
reti ; Int vector 6
reti ; Int vector 7
; ============================================
;     I N T E R R U P T   S E R V I C E S
; ============================================
Step:   in  PortDHold,PIND
; look at only PD#, the Direction input
        and PortDHold,PortDMask8
; if PD3 High, Add Direct to StepCt, if PD3 Low Subtract Direction
        breq SinNeg
        add StepCt,Direction
        rjmp Next
SinNeg: sub StepCt,Direction
; limit StepCt to range from 0 to 7 (-1 becomes 7)
Next:   and StepCt,StepMask
; use Z as a pointer to the StepSequence table
        mov ZL,SeqBase
; StepCt is teh offset into the table
add ZL,StepCt
; transfer the next bit pattern from ProgMem to PortBHold, R20
Lpm PortBHold,Z
out PortB,PortBHold
reti
; ============================================
;     M A I N    P R O G R A M    I N I T
; ============================================
Main:
; Init stack
ldi Conf, LOW(RAMEND) ; Init LSB stack
out SPL,Conf
; Init Port A
ldi Conf,0 ; Direction Port A
out DDRA,Conf
; Init Port B
ldi Conf,(1<<DDB0)|(1<<DDB1)|(1<<DDB2)|(1<<DDB3) ; Direction Port B
out DDRB,Conf
; Set ISC00 to 0 and ISC01 to 1, Falling Edge INT0 Interrupt
ldi Conf,(0<<ISC00)|(1<<ISC01)
out MCUCR,Conf
; Set INTO , Bit 6 of GIMSK to Enable INT0
ldi Conf,(1<<int0)
out GIMSK, Conf
; Initialize StepCt, R17
ldi StepCt,0
; Initailize StepMask, R18
ldi StepMask,7
;Initialize Direction, R19
ldi Direction,1
; Initialize SeqBase to point to 8 bit address of StepSeq
ldi SeqBase, StepSeq
add SeqBase,SeqBase
; Initialize PortDMask8, R22, to mask only PD3 of port D
        ldi PortDMask8,8
        ldi ZH,0   
  sei
; ============================================
;         P R O G R A M    L O O P
; ============================================
Loop:  rjmp loop ; go back to loop
; bit patterns for output to the Stepper Drive Bits.
StepSeq: .DB 1,3,2,6,4,12,8,9,0,0
; End of source code
942  Using Arduino / General Electronics / Re: [QUESTION] - Transistor layout or rather in code - General circuits on: February 14, 2012, 12:28:26 pm
Sometimes it is cheaper (both money & time) to implement something in hardware, sometimes in software. Sometimes it is more efficient to implement in software, sometimes in hardware. It might be simpler to add another AVR or ATtiny chip to a design and create anadditional function in software. A hardware solution might not cost much less, and the software solution might be more flexible.

An 8 pin ATtiny might work just fine for a couple debounced switch inputs, and maybe one of them is a on/off toggle. And then in the next applicatin you need 2 on/off toggles... Just a quick code change.

I am using some ATtiny2313's programmed to accept Step & Direction inputs and output the 4 phases for driving stepper motors. I could do the same thing with chips and wires, but programming the 2313's seemed to be quicker and cleaner, and I can select several different output modes. 2 inputs, 4 outputs to the transistors and its clean, neat and relatively simple. A dedicated 2313 and the code was developed on an Arduino. I still need to add some enable inputs and a ready output and...

A microcontroller is just a bunch of gates that you get to connect with code rather than copper...
943  Using Arduino / Project Guidance / Re: Crossing a metal line on: February 13, 2012, 08:58:10 pm
Or a light source and a photoeye/photo Detector. Detect the cart breaking the beam.
944  Using Arduino / Motors, Mechanics, and Power / Re: Using a servo to pull a cord - how complicated does the code need to be? on: February 13, 2012, 02:26:55 pm
To extend the effective travel you can extend the servo arm.  As long as you keep it within reason you won't overload the servo.  The other option is to look for a continuous rotation servo, but then returning to a position is a problem.
945  Using Arduino / Microcontrollers / Re: Attiny question on: February 13, 2012, 02:16:26 pm
ATTINY45-20PU   is a 20MHZ max clock
ATTINY45V-10PU  is a 10Mhz max clock
Pages: 1 ... 61 62 [63] 64 65 ... 74