Show Posts
Pages: 1 2 [3] 4 5 ... 44
31  Using Arduino / General Electronics / DS3234; Deactivating an alarm on: March 20, 2014, 11:59:05 pm

I'm using the library for the DS3234 found here:https://github.com/rodan/ds3234

I've got alarms to work, but now I need to deactivate one.  This line is what activates, but I don't understand bits and stuff enough to figure out how to turn off Alarm 1.
Code:
// activate Alarm1
    DS3234_set_creg(cs, DS3234_INTCN | DS3234_A1IE);
Quote
Bit 1: Alarm 2 Interrupt Enable (A2IE). When set to logic 1, this bit permits the alarm 2 flag (A2F) bit in the status register to assert INT/SQW (when INTCN = 1). When the A2IE bit is set to logic 0 or INTCN is set to logic 0, the A2F bit does not initiate an interrupt signal. The A2IE bit is disabled (logic 0) when power is first applied.
Bit 0: Alarm 1 Interrupt Enable (A1IE). When set to logic 1, this bit permits the alarm 1 flag (A1F) bit in the status register to assert INT/SQW (when INTCN = 1). When the A1IE bit is set to logic 0 or INTCN is set to logic 0, the A1F bit does not initiate the INT/SQW sig- nal. The A1IE bit is disabled (logic 0) when power is first applied.
taken from the data sheet:
https://www.sparkfun.com/datasheets/BreakoutBoards/DS3234.pdf

When I activate alarm 1, I need to deactivate alarm 2, because it could fire off prematurely.  And vise versa--when I activate alarm 2, I need to deactivate alarm 1.  I know it must be simpleā€¦
thanks
32  Using Arduino / Microcontrollers / Re: Using a cheap USBasp with a TQFP programmer on: March 13, 2014, 05:20:01 pm
Sorry, I've only ever used the Arduino IDE to load sketches or burn bootloader to Atmega chips. I guess avrdude is a program?  It sounds like it might just be easier to use jumpers from my UNO's pins to my TFQP adapter when I want to program the Atmega328P -AU chips.
I thought this usbasp. Thing would just show up as a serial port that I'd select when I want to burn a bootloader.
33  Using Arduino / Microcontrollers / Using a cheap USBasp with a TQFP programmer on: March 13, 2014, 10:33:04 am
I got this TQFP32 programmer and have used it to boatload ATmega328P-AU chips by connecting the pinout to the appropriate pins on my UNO, and using my UNO as the ISP.  Since these USBasp's from china were so cheap, I thought I'd try one.  I just figured I could plug my TQFP adapter into it and viola!  But maybe not.  Is there a trick to using these on a macbook 10.7, or is it more trouble than it's worth?
See the photo of what I have, and also a couple links of the items:
http://www.ebay.com/itm/171201827956?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

https://www.hobbyking.com/hobbyking/store/__27195__Atmel_Atmega_Socket_Firmware_Flashing_Tool.html

34  Using Arduino / General Electronics / Re: Adding a FTDI to my project on: February 27, 2014, 07:35:39 am
Thanks. I should have checked that. 
I'm pretty sure I have the Rx & Tx connected wrong too.
35  Using Arduino / General Electronics / Re: Adding a FTDI to my project on: February 27, 2014, 06:55:53 am
Huh?
I don't know what VUSB is. Here's photos of the schematic I'm talking about in case you can't view the PDF files.
The before and after. Please read my first post to see my question.
36  Using Arduino / General Electronics / Re: Adding a FTDI to my project on: February 26, 2014, 10:56:12 pm
To visualize my question, here is the schematic after I made these changes.  Will this work? 
I'm wondering if the TX & RX pins are connected correctly, though.  Do I need the FTDI's TX pin to connect to the Atmega328's RX pin?
37  Using Arduino / General Electronics / Adding a FTDI to my project on: February 26, 2014, 10:48:24 pm
I want to add an FTDI chip to my project so it can be connected via USB, rather than a separate FDTI cable.
So I copied the schematic from the FTDI basic, from Sparkfun, and pasted it into my new project.  
Since I won't be using 3.3 volts, can I delete C1 and the net connected to pin 17 on the FTDI chip? And can I remove the solder jumper SJ2, and then connect pin 4 on the FTDI chip to 5V?  I think this is right, but want to make sure.
After doing this, the 2 schematics will just kinda merge together into one I believe, with the FTDI allowing the USB port to talk to the Atmega chip.
Thanks.


ps.  Also, I see CTS from the FTDI chip will not be connected to anything.  It's ok to leave it unconnected?  The DTR pin is what resets the Atmega chip during programming, right?
38  Using Arduino / Project Guidance / Re: disabling a MAX16910 with a DS3234 on: February 26, 2014, 11:57:29 am
I think the BSS138W is what I need, but I'm not sure of the schematic.  Here's a photo of an attempt.
The MAX16910 when powered up, will supply 5V to the DS3234, an Atmega chip, and other components like a LCD, etc.  When it's not powered up, the DS3234 will run on low quiescent current from it's coin cell battery, awaiting the next alarm trigger to power things back up.

MAX16910 datasheet
http://datasheets.maximintegrated.com/en/ds/MAX16910.pdf

BSS138W datasheet
http://www.fairchildsemi.com/ds/BS/BSS138W.pdf

DS3234 datasheet
https://www.sparkfun.com/datasheets/BreakoutBoards/DS3234.pdf
39  Using Arduino / Project Guidance / disabling a MAX16910 with a DS3234 on: February 26, 2014, 09:58:34 am
http://www.maximintegrated.com/datasheet/index.mvp/id/6336
this regulator uses only 1.6 uA when it's disabled. To enable to regulator, the EnablePin must to driven high. 
https://www.sparkfun.com/datasheets/BreakoutBoards/DS3234.pdf
The DS3234 can sleep, using only 1.5uA from it's coin cell battery.  So I want to shut down my project (Atmega328 is the base of it), by controlling the MAX16910 regulator with the INT pin from the DS3234.  But the DS3234 uses it's alarm to trigger the INT Pin to go LOW, but the MAX16910's enable pin is active high, so to startup the regulator, i have to pull its enable pin HIGH.  Is it possible to have the DS3234's INT pin do this with minimal extra components and quiescent current?
40  Using Arduino / Microcontrollers / Getting back to my question on: February 17, 2014, 06:10:22 am
http://3g1l.com/blog-burn-bootloader-blank-atmega328atmega328p-arduino-uno
On the page we find this:
Quote
Update:
If your chip comes straight out of the factory it 'should' be fused to work without an external clock -  meaning that you don't need the clock and the two capacitors.
But if you allready burnt a bootloader (even if it was aborted) or your supplier modifed the fuses for some reason - you need them.

To remove some of the variables from my question;
1) the only purpose of my project is to burn boot loaders to different chips, so,
     A) it's only a temporary setup for the second chip
     B) the primary chip won't be doing anything else, so it won't matter if even all it's CPU is consumed in this task.
     C). The secondary chip I'm burning, when installed in its permanent home, will have a 10k resistor on the reset pin, and crystal and caps for 16 MHz.

So then I was hoping I could burn a boatloader to them without the caps, & crystal, and maybe even the resistor. But this quote from another website says if the chip is already is fused for a crystal it won't work. I just wondered if this was true?  If it not true, I've got a meat idea that I think others would enjoy, but it means burning a boot loader on an atmega328P-AU without the crystal. And it can't be that it must he fused right to start with. It has to work either way. 
Hope this clears up my question a little.
41  Using Arduino / Microcontrollers / Burning boot loader without reset resistor on: February 16, 2014, 12:49:24 pm
http://arduino.cc/en/Tutorial/ArduinoToBreadboard#.UwD6jX-9KSM
In this example, could the 10K resistor be omitted if the Arduino ISP sketch was modified to set the reset pin high on the chip to be burned, rather than the resistor pulling it high. Would the Arduino not act as the 10K pull-up resistor?  There'd be the issue of current limiting  which the 10K resistor does, but wouldn't the Arduino doing the boot loading limit it's output, and with the whole process just taking long enough to burn a boot loader...  Maybe the 10K is definitely needed?  Anyone know for sure?  Thanks.
42  Using Arduino / Microcontrollers / Re: Arduino as ISP Programmer, but using different pins on: February 16, 2014, 09:44:37 am
When burning a boot loader onto an Atmega328P on a breadboard with an UNO as the ISP, do you necessarily have to use the pins 10 thru 13 on the Arduino UNO. 
You can use any pins you want but you will have to implement a bit-banged SPI.  TinyISP actually has the majority of what you want.  It's coded to use the symbols MISO, MOSI, SCK, and RESET to identify the SPI pins.  Those would have to be changed to whatever pins you want to use.  The relevant code starts here.

Thanks!  I'll check this out and may be back for more help!  I'll set up some code to use alternate pins and see how it works.
43  Using Arduino / Microcontrollers / Re: Is the Micro kinda weird? on: February 15, 2014, 10:46:48 pm
Posting your code for us look at, might speed up the help we can give.
44  Using Arduino / Microcontrollers / Arduino as ISP Programmer, but using different pins on: February 15, 2014, 10:44:43 pm
http://arduino.cc/en/Tutorial/ArduinoISP#.UwA0f3-9KSN
When burning a boot loader onto an Atmega328P on a breadboard with an UNO as the ISP, do you necessarily have to use the pins 10 thru 13 on the Arduino UNO.  Could you use any pins, and just change the pins number in the ISP sketch loaded on the UNO, or does it HAVE to be the pins affiliated with MISO, MOSI, and SCK, on the UNO?
45  Using Arduino / Sensors / Re: Is noInterrupts(); needed with a volatile variable? on: February 06, 2014, 08:32:41 am
Wow!
Pages: 1 2 [3] 4 5 ... 44