Show Posts
Pages: [1] 2 3 4
1  Using Arduino / Microcontrollers / Re: Programming of Custom Arduino Board on: October 31, 2013, 05:14:49 pm
I wish I understood what you all were talking about. However my question would be, doesn't lily pad use serial communication to program? If so, then what's the problem if I just bootload this board as a lilypad and then program it accordingly?
2  Using Arduino / Microcontrollers / Re: Programming of Custom Arduino Board on: October 25, 2013, 05:31:44 am
Thanks so much for the replies. So I have removed the crystal. It seems to me that I should at this point be able to prgram it as if it were a lilypad. I can load the lilypad bootloader via isp, then program with arduino ide. I believe the serial speed is low enough to reliably work with the internal oscillator doing it that way, correct?

I am still looking for validation that there aren't any hidden steps, extra things I need to add to perform this operation. I can see no reason there should be, but I am very new at this. Also, how hard is it to pull a program I've written in arduino into avr studio? I did not have ANY success generating a hex file and then trying to do that last time so I want to stay away from that. If I am going to program with AVR I would like to just write the program from scratch in AVR. Thank you!
3  Using Arduino / Microcontrollers / Re: Programming of Custom Arduino Board on: October 24, 2013, 06:52:11 pm
One last question which I forgot. If I don't need the precision of the external clock, can I just remove that and then bootload it with the lilypad bootloader?
4  Using Arduino / Microcontrollers / Programming of Custom Arduino Board on: October 24, 2013, 06:30:54 pm
All, I see the attached board and schematic for info. My plan is to get the boards made, bootload using the ISP pin out and then program via a usb to serial adapter for the arduino mini. Is this reasonable and am I missing anything to make this happen? Previously I did a similar board and was trying to straight ISP with AVR studio from a .hex file generated from arduino. I could never get that to work, and one of the problems I had was that I could never get the fuse bits set correctly. Does installing the bootloader set the necessary fuse bits?

In summary my questions:
1 . is there anything more involved with doing this than hooking up to ISP with an MKII programmer, opening arduino and telling it to install a bootloader, then hooking it up to the usb to serial board and telling it to upload my sketch?
2. Does anyone see any problems with either my schematic or .brd. the board passed iteadstudio's drc.

The board is supposed to look exactly like a pro mini to the computer.

All the board is doing is turning a solenoid valve on and off at a dwell and frequency controlled by two potentiometers. 
5  Using Arduino / Displays / Re: New Haven LCD accepts numbers not strings on: October 06, 2012, 10:56:14 am
I do not know how to set the fuses, or what they should be set to work.

We are actually dealing with situation 3.

I'm afraid you are giving me a little more credit than I deserve. This is my first project with a microcontroller, so it is best to assume that I know very little. To be exact, this is a custom board that is running a Atmega168a with an external 8MHz ceramic resonator. It is basically all the components of an arduino pro mini on a custom board with a 4 bit newhaven LCD COG 2x16 display. The chip is running at 3.3V.

Do you have a reference for the process of setting the fuses through IDE or is it best to do another proceedure for setting the fuses? (say AVR Studio) Thank you for the reference for the correct fuse settings. Why are the settings different from the Mini to the Pro mini? I believe that the correct settings for me would be the "Pro Mini" settings:

Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega168
Low Fuse 0xC6
High Fuse 0xDD
Extended Fuse 0×00
6  Using Arduino / Displays / Re: New Haven LCD accepts numbers not strings on: October 05, 2012, 07:11:41 am
Google produced results on how to set fuses with AVR Studio but not with Arduino without bootloading it. I saw a couple things that mentioned it but the explainations were much to high level for my very elementary understanding of the subject.

From the data sheet I got the list of fuse settings I posted above. Which of those settings corresponds to an external ceramic resonator?
7  Using Arduino / Programming Questions / Re: AVRISP MKII AVRDUDE Can't find USB on: October 05, 2012, 06:47:18 am
Since question has become more one of dispay issues, I have started a new topic here:

http://arduino.cc/forum/index.php/topic,125470.0.html
8  Using Arduino / Displays / Re: New Haven LCD accepts numbers not strings on: October 04, 2012, 10:29:11 pm
Thank you! I had just discovered that. I do not know how to set the fuses, or what they should be set to work with the ceramic resonator I'm using. I'm quite sure that is the issue. I'm programming the board directly not bootloading it. The data sheet has different settings:

Device clocking option CKSEL3..0
Low power crystal oscillator 1111 - 1000
Full swing crystal oscillator 0111 - 0110
Low frequency crystal oscillator 0101 - 0100
Internal 128kHz RC oscillator 0011
Calibrated internal RC oscillator 0010
External clock 0000
Reserved 0001

It's still all greek to me as I don't know how to set the fuses. never had to mess with it before.
9  Using Arduino / Displays / Re: New Haven LCD accepts numbers not strings on: October 04, 2012, 09:50:07 pm
More strange problems the timer appears to not be working correctly. it is moving far to slow. In fact as best I can estimate it, delay(1000) actually produces a delay of 7.8 seconds. That would seem to indicate the clock is running at 1MHz. do not understand that. I am using an 8MHz crystal resonator and programmed it as 8MHz. Tried programming it as 16MHz and it now takes just under 16 seconds. So clock is definitely running at 1MHz

Perhaps these issues are related, if the clock is messed up perhaps that's somehow messing with serial communication with the lcd screen.
10  Using Arduino / Displays / Re: New Haven LCD accepts numbers not strings on: October 04, 2012, 09:02:08 pm
I found the exact offending piece of code. all the other char*'s do not cause a problem, just this one. no clue why. Any thoughts?

char* sps[44]={"       8        ", "       9        ", "       10       ",
"       11       ", "       12       ", "       13       ", "       14       ",
"       15       ", "       16       ", "       17       ", "       18       ",
"       19       ", "       20       ", "       21       ", "       22       ",
"       23       ", "       24       ", "       25       ", "       26       ",
"       27       ", "       28       ", "       29       ", "       30       ",
"       31       ", "       32       ", "       33       ", "       34       ",
"       35       ", "       36       ", "       37       ", "       38       ",
"       39       ", "       40       ", "       41       ", "       42       ",
"       43       ", "       44       ", "       45       ", "       46       ",
"       47       ", "       48       ", "       49       ", "       50       "};
11  Using Arduino / Displays / Re: New Haven LCD accepts numbers not strings on: October 04, 2012, 08:34:37 pm
So I think I have found the culprit. I initialize a series of char* indices that will be used to display menu text on the lcd. That causes the lcd to not work properly when I feed it a string. The strange thing is it worked on my prototype with no problem. Any ideas why this might be/how to fix it? below is an example of the code that is causing problems.

Code:
char* Returntime[12] = {"      0 msec      ", "      1 msec      ", "      2 msec      ", "      3 msec      ",
"      4 msec      ", "      5 msec      ", "      6 msec      ", "      7 msec      ", "      8 msec      ",
"      9 msec      ", "      10 msec      "};
12  Using Arduino / Displays / Re: New Haven LCD accepts numbers not strings on: October 04, 2012, 08:20:57 pm
More progress!  I wrote a simple code that only controls the lcd and none of the other stuff on the board and it works! so apparently there's something in my code that is causing the lcd to malfunction. will rebuild code piece by piece at this point and try to determine what it is. this is superb news. :-D
13  Using Arduino / Displays / Re: New Haven LCD accepts numbers not strings on: October 04, 2012, 07:56:38 pm
So, result of tonights experiment. using .write() and feeding that a hex value I can display any character that I want. Just like the datasheet diagram: http://www.newhavendisplay.com/specs/NHD-C0216CZ-NSW-BBW-3V3.pdf

so if I feed it: lcd.write(0x34) it displays a 4. so I've somehow got a software bug. it would seem that the print command is not working. I understand why.
14  Using Arduino / Displays / Re: New Haven LCD accepts numbers not strings on: October 03, 2012, 08:03:24 pm
Going to try lcd.write instead of print to see what that does. seems like the write command at least is functioning since it's writing number. seems like it's just the print command that is causing problems. I did have issues with getting the libraries formatted correctly, so maybe it's a glitch from that.
15  Using Arduino / Displays / New Haven LCD accepts numbers not strings on: October 03, 2012, 08:49:00 am
This is a continued topic from http://arduino.cc/forum/index.php/topic,121544.msg943204.html#new.

Since it has become more of a question regarding the display I thought it would be appropriate to start a thread here. Hopefully that doesn't give anyone heartburn.

Here's the situation:
UPDATE:

Progress! I finally got access to an xp computer. got ide installed and the libusb0.dll driver for the MKII. It did exactly the same thing as with AVR studio. I wrote a simple blink code and wha-do-ya-know...it worked!

At this point I have determined that there is a problem somehow with the lcd screen. I checked that all my pin assignments are correct. It will initialize with no problem and give me a cursor. I can even move that cursor anywhere I want. I can turn the back light on and off. However when I try to print to it, it does essentially nothing. If I tell it to print any single character (that I've tried) it prints a bunch of spaces followed by "45" followed by more spaces. It's late, I have to go to bed. but if anyone has ideas as to what the problem might be, please let me know, thanks! Goodnight world.

Interesting. It prints numbers correctly if I give it the correct base input. So somehow it's just not handling the strings I'm trying to feed it properly...hmmmm.....

newhaven COG character display. 2x16. I am using the doglcd libraries. print command is supposed to accept a variety of character inputs. strings, char*, etc. without sepecification. I am simply feeding it this:

lcd.print("hello world!");

and it is not dealing with it properly.

I do not know what you mean by "how is it connected". would you like a diagram? It is mounted on a custom pcb which essentially acts like a 3.3v arduino mini with atmega168. it uses pins: (8, 7, 5, 6, A3, A4) as I recall. initializes properly with those pins. If you are wondering if it's a connection issue, it is rather unlikely. possible that I crossed a wire on the board, but the population is professionally done by a lady that does custom boards for the military. Most likely the problem lies elsewhere. I can post schematic and brd layout if anyone is interested in looking at them.


Thanks!
Pages: [1] 2 3 4