Show Posts
Pages: [1] 2 3 4
1  Using Arduino / Networking, Protocols, and Devices / Re: DS3234 No Battery Backup on: August 25, 2014, 02:05:08 am
Actually, I don't know how that 1Hz wave will affect me.  Does it matter if I just need the right time?  I am not using alarms.

I will check the mode and the voltage.  It should be correct, I have tried it many ways around.
2  Using Arduino / Networking, Protocols, and Devices / DS3234 No Battery Backup on: August 24, 2014, 12:30:06 pm
I have a Sparkfun DS3234 RTC. The data sheet is here:

https://www.sparkfun.com/datasheets/BreakoutBoards/DS3234.pdf

When I withdraw power it does not save the time, even though the battery is new.  I have set the EOSC bit to zero like this:

Code:
pinMode(cs,OUTPUT);
  SPI.begin(); 
  SPI.setBitOrder(MSBFIRST);
  SPI.setDataMode(SPI_MODE1);
  //set control register
  digitalWrite(cs, LOW); 
  SPI.transfer(0x8E);
  SPI.transfer(0x0);
  digitalWrite(cs, HIGH);

Is this correct?  Any help needed.

Thanks.
3  Using Arduino / Installation & Troubleshooting / Ubuntu 14.04 on: July 18, 2014, 02:18:46 pm
I am trying out the UTouch button test from here:

http://www.henningkarlsen.com/electronics/library.php?id=55

I have a Sainsmart 3.2" TFT and an Arduino Mega 2650.

The demo "Button Test" on Ubuntu 14.04, does not work, the screen does not reconise the presses, even after doing the calibration it does not work.  My touch is not reconised or very inaccurate.

On my Mac, exactly the same setup, everything works fine.  Why does Ubuntu not work? I installed it from the Ubuntu SW manager.  Do I need any special drivers?
4  Using Arduino / Programming Questions / How to inform the UI of data received? on: March 06, 2014, 04:20:24 am
Hello,

I have created a UI that is waiting for some data to be received from my RF receiver.  When it sees that it updates the UI.  Currently I am using the Observer design pattern but the problem is that I wanted to keep all the UI stuff separate from the HW stuff.  The observer pattern forces me to create an object of UIScreen class in my HW code.  So, now the HW is too linked to the UI.  Is there a better way of doing this?

Thanks.
5  Using Arduino / Programming Questions / Re: Help in adding a RTC-1307 to my clock project on: February 23, 2014, 01:39:08 am
Hi,

I want to use a DS1307 using I2C does that help. And how can a RTC lose a few seconds a day!!! If so what's the point in using one?

It's a real pain, for this reason I just got me a Sparkfun DS3234.  It should lose only a few seconds per month, which is good enough for me.  It uses SPI.
6  Using Arduino / Programming Questions / Re: Help in adding a RTC-1307 to my clock project on: February 22, 2014, 08:53:10 am
I only needed this library with my DS1307

http://henningkarlsen.com/electronics/library.php?id=34

You'll need to calibrate it too as it will or can lose a few seconds per day.  So, say at midnight every day add or subtract a few seconds.
7  Using Arduino / Programming Questions / Re: ICSP Header Pins & DS3234 on: February 21, 2014, 12:23:26 pm
I just tried on an UNO, just that and nothing else and still no luck.  Changed pins to

SS  = D8
MOSI  = D11
MISO = D12
SCLK = D13
VCC = 3.3
GND = GND

Does it work without a battery?
8  Using Arduino / Programming Questions / ICSP Header Pins & DS3234 on: February 21, 2014, 10:52:30 am
I am using the DS3234 Library from here

http://www.henningkarlsen.com/electronics/library.php?id=71

And the HW from here, with no battery

https://www.sparkfun.com/products/10160

I have an Arduino Mega 2560, connected to a 3.2" Sainsmart TFT, which is using the Pins

static const uint8_t SS   = 53;
static const uint8_t MOSI = 51;
static const uint8_t MISO = 50;
static const uint8_t SCK  = 52;

And so I connected my RTC to the ICSP pins
// ICSP header pinout:      +---+---+
//                1 - MISO  | X | X |  2 - Vcc
//                          +---+---+
//                3 - SCLK  | X | X |  4 - MOSI
//                          +---+---+
//                5 - Reset | X | X |  6 - GND
//                          +---+---+

MISO  -- MISO
SCLK  --  CLK
MOSI  --  MOSI
 SS =  Pin 9

VCC and GND connect to the Arduino Pin VCC and GND and not the ICSP header.  When I run the example code, I do not see any time.  Can I run from the pins and the ICSP at the same time?

Thanks.
9  Using Arduino / Programming Questions / Re: Using the UTFT library in derived classes on: February 15, 2014, 02:10:29 am
They're defined, at the top of the base .cpp file outside of the class.  So just sitting there at the top of the file.

Code:
UTFT MM_myGLCD(ITDB32S, 38,39,40,41);
UTouch MM_myTouch(6,5,4,3,2);
UTFT_Buttons  MM_myButtons(&MM_myGLCD, &MM_myTouch);

I use them in the base class to draw up some stuff..

Code:
MM_myGLCD.printNumI(aMax, 100, 81, 3);

Now I have a derived class which wants to add some extra things to the UI.

Code:
MM_myGLCD.printNumI(value, 100, 100, 3);

That will not work.  I must add to the top of the derived .cpp file

Code:
UTFT MM_myDerivedGLCD(ITDB32S, 38,39,40,41);
UTouch MM_myDerivedTouch(6,5,4,3,2);
UTFT_Buttons  MM_myDerivedButtons(&MM_myGLCD, &MM_myTouch);

And draw everything again, you cannot have two of those classes on one screen.  Also I cannot make them protected or part of the class in any way.  Or I don't know how to.

Any ideas?

Thanks.
10  Using Arduino / Programming Questions / Re: Reading the first 3 characters of incoming string on: February 14, 2014, 05:15:36 pm
See here:

https://www.inkling.com/read/arduino-cookbook-michael-margolis-2nd/chapter-2/recipe-2-5

String s = incomingString.substring(0,3);
11  Using Arduino / Programming Questions / Re: Using the UTFT library in derived classes on: February 14, 2014, 05:13:31 pm
I can upload the code tomorrow, don't really see why you need it though??

Basically how can I use those static variables in derived classes? 

UTFT MM_myGLCD(ITDB32S, 38,39,40,41);
UTouch MM_myTouch(6,5,4,3,2);
UTFT_Buttons  MM_myButtons(&MM_myGLCD, &MM_myTouch);

Generally, can be any code and any static I guess.
12  Using Arduino / Programming Questions / Using the UTFT library in derived classes on: February 14, 2014, 12:26:27 pm
I am using the UTFT library, which you can find here:

http://www.henningkarlsen.com/electronics/library.php?id=51

I have a base class called MinMaxScreen, which draws up some general screen for setting the required minimum and maximum values.  Then I have a derived class Called TempScreen, it too draws the min and max required levels.  However here I would like to draw an extra calibrate button.  The problem is that when setting and drawing the buttons with this library I cannot share the instance of the UTFT class with the derived class.  I have to set the UTFT class always in the .cpp file like this:

UTFT MM_myGLCD(ITDB32S, 38,39,40,41);
UTouch MM_myTouch(6,5,4,3,2);
UTFT_Buttons  MM_myButtons(&MM_myGLCD, &MM_myTouch);

Outside of the class, just sitting there as a global for that file.  How can I share this instance with many classes? 

Thanks.
13  Using Arduino / Programming Questions / Arduino --Relax flag on: July 03, 2013, 01:04:42 pm
Hello,

I am using the Arduino 2560, which has 256kb flash.  When I go over ~114kb, I get an out of range warning and my code won't run anymore.  How can I set the --relax flag so I can use the full 256kb?

Thanks.
14  Using Arduino / General Electronics / Re: VCO in PLLS on: April 23, 2013, 01:04:01 am
Yes, of course.  Thanks alot smiley
15  Using Arduino / General Electronics / Re: VCO in PLLS on: April 23, 2013, 12:39:59 am
Yes I get that part.  But why does the VCO get ahead but not the reference clock?
Pages: [1] 2 3 4