Show Posts
Pages: [1] 2
1  Using Arduino / Installation & Troubleshooting / Re: All new work lost... on: July 30, 2013, 02:49:44 pm
FYI - I link to a couple of great Git resources on my answer here. The graphic specifically helped me wrap my head around Git.

smiley -ChrisK
2  Using Arduino / Installation & Troubleshooting / Re: All new work lost... on: July 19, 2013, 01:27:08 am
Aw man, that sucks! smiley-sad

Personally, I use PsPad when in Windows and Geany when in Linux. And I always always Ctrl+S when I pause for any moment.

I think this has happened to all of us ... thankfully, you will be able to re-create that good code! Trust me, I know.

-Chris
3  Using Arduino / Installation & Troubleshooting / Re: how to check the hardware reset button on: July 19, 2013, 01:15:47 am
Hi Reno, please let us know either way of the result. smiley If it doesn't work, hopefully we can help you fix it!

Good luck!
Chris
4  Using Arduino / Installation & Troubleshooting / Re: avrdude: stk500_recv(): programmer is not responding on: July 19, 2013, 01:14:04 am
Note to anyone reading: unplug the wall wart when trying to do this!! With wall wart still connected, the above trick doesn't work. smiley-razz
5  Using Arduino / Microcontrollers / Re: Goldilocks = Arduino Uno + 1284p on: July 19, 2013, 01:08:14 am
feilipu, thank you SO MUCH, this really is the perfect Arduino for me! My projects tend to vary somewhere near the RAM limit of the UNO but do not require all the pins of the Mega. I'm buying 2 or 3 as soon as they are selling and shipping from freetronics!

Thanks,
Chris
6  Using Arduino / Microcontrollers / Re: Goldilocks = Arduino Uno + 1284p on: July 17, 2013, 07:32:56 pm
This is outstanding. smiley As soon as they're available, I'll be buying two. 1 because I know it'll replace a Mega I have dedicated to a task. The other to have for next time. You might like my comments about the eleven here and here.

I like your improvement on the UNO the most so far. smiley-grin
7  Using Arduino / Installation & Troubleshooting / Re: avrdude: stk500_recv(): programmer is not responding on: July 14, 2013, 09:32:50 pm
Closely related is: stk500_getsync(): not in sync: resp=0x00 from the archives.

In my case, I have a combination of hardware where I need to use D0:D7 to transfer bytes into or out of an IC. So I use PORTD for this. I found that I can use the user input to set an upload mode where I can reset D0 and D1 for successful upload:
Code:
// 1st set the control lines to IC to reset it
// Then put D0 and D1 back to normal condition:
pinMode(0, INPUT);
pinMode(1, OUTPUT);
8  Using Arduino / Programming Questions / Re: Any special steps needed to use Analog pins as Digital output? on: July 12, 2013, 11:14:15 am
@MarkT, actually, while working on it, the data lines always get where they need to be for the duration of the control signal ... then is undefined between. The reads go while /RD is low. I see it slam to the rail instantly high or low.

BTW, I got it working! Took about 3 or 4 hours of messing with the control bits and reading another company's report of messing with the 7166 to get it working.
9  Using Arduino / Programming Questions / Re: Error message: expected constructor, destructor, or type conversion before '(' t on: July 11, 2013, 02:55:42 pm
It may want a semicolon in the empty while?

Code:
while (digitalRead(inputpin)==0) {}

This is what I normally do:
Code:
while (digitalRead(inputpin)==0)
     ;
10  Using Arduino / Programming Questions / Re: Any special steps needed to use Analog pins as Digital output? on: July 11, 2013, 02:52:37 pm
Thanks, both of you!

I changed the
Code:
#define ic_nRD 14
to
Code:
byte ic_nRD = 14;
Didn't work, so with Larry's words I went through the 420 lines of the file one at a time. I changed the pin defintes to bytes & got rid of legacy crap from other peoples' code like uint8_t, volatile etc. Tried that... BAM!! lots of compile errors! Somehow, code I was working from generated some kind of situation where it was masking errors. Ran it... still no change.

I got my other Uno (a freetronics eleven) and cut and pasted just the new 7166 + Analog code to it. Instantly saw activity on the scope. Starting up makes quite a bit of stuff happen.

Changed the Adafruit shield to hardware SPI (which did speed that up). Swapped the eleven out with the Uno running the current code ... and the board's behavior was a little different. Possibly software SPI slowed down the Atmega enough that other stuff was missed or masked.

So now, thanks to cleaning up the code, I can see analog pins changing and I see it's trying to work. Looks like I need to introduce delay(1) almost anytime I interact with the chip. All of its timings are in the nano seconds on the data sheet but I saw that without a delay, the voltage on the digital pins wasn't reaching 5V and had a few usec curve.

So progress now! Thanks again!
Chris
11  Using Arduino / Programming Questions / Any special steps needed to use Analog pins as Digital output? on: July 10, 2013, 08:23:58 pm
Hey Everyone,

Usually, I figure these things out, but I am somewhat perplexed in this situation. I'm trying to use A0,A1,A2, and A4 to control access to an IC. I've got a scope set up on two of those pins and they just don't change states. I google'd a LOT and about it (as well as the unrelated port mapping on PORTD).

So I define the pins:
Code:
#define ic_nRD  A0
#define ic_CnD  A1
#define ic_nWR  A2
#define ic_nCS  A4
... which I also tried with 14,15,16, and 18 with the same result.

In the top of setup() I do this:
Code:
void setup() {
pinMode(ic_nRD, OUTPUT);
pinMode(ic_CnD, OUTPUT);
pinMode(ic_nWR, OUTPUT);
pinMode(ic_nCS, OUTPUT);

digitalWrite(ic_nRD, HIGH);
digitalWrite(ic_CnD, HIGH);
digitalWrite(ic_nWR, HIGH);
digitalWrite(ic_nCS, HIGH);

When the Arduino resets, the chip select (nCD) and Control not Data (CnD) go low, which is active state. As my Arduino completes setup, I have a graphics shield that says push a button to make it start. (graphics shield is the Adafruit 1.8" TFT with joystick on Analog 3) And then all I get is pin A1 changes to high. No other changes at all and nCS stays low all the time regardless.

Once the button pushes, setup() calls my init_7166() function, which starts really banging away on nCD and CnD. Obviously, I'm skipping something simple as it's not even getting through setup() correctly. Attached drawing (from Fritzing) shows how my hookup is made to the LS7166 datasheet pdf. The yellow and green wires heading out the bottom are going to the quadrature encoder from a glass slide scale with micron resolution. I've gone over the connections a BUNCH of times...

Help please. smiley

Thanks,
Chris
12  Using Arduino / Displays / Re: Degrees symbol on lcd? on: June 22, 2013, 07:14:08 pm
If you can't find the datasheet for the driver, program a pager that scrolls through the characters. I just made a post about this exact thing. My TFT has about 1000 characters, so almost everything is in there. My 16x2 only had a couple hundred...
13  Using Arduino / Displays / Re: Lcd backligth problem on: June 22, 2013, 07:12:18 pm
If it was an assembled shield, there are circuit layout problems with those. Google 16x2 backlight pwm and you'll probably find what I'm talking about. I just turned mine off...

Chris
14  Using Arduino / Displays / Character map for Adafruit_GFX, Adafruit 1.8" TFT w/Joystick on: June 22, 2013, 07:11:02 pm
Hey everyone,

I couldn't find any notes on the character map as found in the Adafruit 1.8" TFT w/Joystick shield, which uses the ST7735 and foundation Adafruit_GFX library. The font is described in Adafruit_GFX/glcdfont.c but I couldn't decipher the values and decided to see them rather than write a program to hash the source file.

I have a working sketch here https://github.com/cacycleworks/st7735_charmap it lets you page through the character map and has a grid. Left column has the starting number for each row, ex: 0x10. Across the top are the numbers for each column, 0-f. In the sample picture, left arrow quote is 0xae.

Moving the joystick down scrolls down to the next page. (and up moves up)

smiley-grin Chris

15  Using Arduino / Displays / Re: Sainsmart 1602 LCD shield causes sketch to run incorrectly on: April 13, 2013, 07:20:58 pm
Before realizing I shouldn't have, I bought one of these LCD keypad shields. I have been able to make it work with other things happening, specifically, a motor driver shield, and a sensor shield. So I know all about problems getting things to play nicely. ... and my soldering skills are getting better all the time! smiley-grin

ok... I open up a successful sketch... let's check out my defined pins:
Code:
#define EN1_PIN 3
#define EN2_PIN 11
#define DIR1_PIN 12
#define DIR2_PIN 13
// int a0 = 0; // CANNOT USE: pin 0 is key input from LCD!
int a1 = 0; // this has +Vcc connected to sense for max ADC value
int a2 = 0; // PF1C / PF3C connector
// int a3 = 0; // CANNOT USE: pin 3 is PWM for motor CHA
int a4 = 0; // PF09 connector
//////////////////////////////////////////////////////////////////
//LCD setup using LiquidCrystal library
#include <LiquidCrystal.h>
#define LCD_BACKLITE_PIN 10
// select the pins used on the LCD panel
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

Right off, I'm seeing that your pins are different from mine in the LiquidCrystal instantiation, so that's possibly your problem.

Other pins I'm using above: Digital pins 3,11,12,13 for stepper motor shield; Analog pins 2 and 4 for throttle position sensors that I'm testing; and I briefly had pin 1 shorted to prove to myself that 1024 on the ADC is in fact +Vcc.

Note that digital pin 10 is separately declared; this was so I could do whatever the software fix they said to do in the other posting.

I use this keypad shield as the user interface, making my Arduino test bench autonomous. I did end up using a Mega for the bigger RAM and more pins. My next revision is to use Adafruit's 1.8 TFT w/ joystich shield as the UI for my "stack".

smiley Chris
Pages: [1] 2