NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Everything Else » Anybody using Atmel Studio 6 and Windows 8?

January 06, 2013
by Ralphxyz
Ralphxyz's Avatar

I can not figure out how to use external #include references.

I want to include the libnerdkits files in my project but Studio fails to make the connection.

Any help appreciated.

Ralph

January 06, 2013
by Noter
Noter's Avatar

Seems most of the folks at AVRfreaks use AS6, maybe try over there.

January 06, 2013
by Ralphxyz
Ralphxyz's Avatar

I have a thread going at AVRfreaks.

They have been most helpful I am able to load the libnerkits files into the project but not link the external #includes.

It is funny the GCC compiler knows how to handle external #includes so it is just Studio 6 munging the works up.

Ralph

January 06, 2013
by Noter
Noter's Avatar

If you use the -I switch on the avr-gcc command line and then put your include file in <> brackets it will find them.

For example in the command: -I/home/paul/code/libnerdkits

then in the source: #include <lcd.h>

But I don't know if you can add switches to the avr-gcc command in AS6.

January 06, 2013
by Noter
Noter's Avatar

I looked at the avrFreaks thread and see the problem you are having is not with the lcd.h include like I thought but rather linking to the lcd.o file. IDEs like AV6 automatically do all the makefile stuff for you but then you still have know how to setup and manage a project within them. There is a way to add another source to your AV6 project and you need to do that with the lcd.c file so it will be considered part of your project thus compiled and more importantly linked in the final .hex file. It's basic project management stuff common to all IDE's, did you complete a tutorial on AV6 prior to jumping in?

January 06, 2013
by Ralphxyz
Ralphxyz's Avatar

I quickly went through the tutorial but it got so complicated.

I have never really learned the finer point of using a IDE.

Since I am having such a hard time with Windows 8, not being able to use the Nerdkit USB because of the Prolific driver not being updated that is why I thought I'd try Studio.

Also my AVRISP mkII ISP does not work in Windows 8 so I am running a XP Pro virtual computer.

I'll go through the tutorials once again.

Ralph

January 06, 2013
by Noter
Noter's Avatar

I don't find any problems on the net about PL-2302 and windows 8 not working. Possibly you have the wrong driver version installed? May have to manually uninstall/remove it and then install the correct version. Here's the windows 7 procedure and maybe it is the same for windows 8, don't know but may be worth a try.

All my windows boxes were getting old and slow so I switched to ubuntu last year and I am happy with it. First off I run on an old, very old, laptop and with linux it performs much better than windows XP on my newer desktop and even better, I didn't have to spend a bunch of money on windows upgrades. Still have my XP desktop but never turn it on any more.

January 06, 2013
by esoderberg
esoderberg's Avatar

Ralph, This might help (5 minute video):

ATMEL_link_files_video

Eric

January 06, 2013
by Ralphxyz
Ralphxyz's Avatar

I started running Ubuntu this summer with a dual boot for Ubuntu and Windows 7.

I had a home built computer that I put together 4 years ago, it cost me $2,000.00 at the time so you can imagine it was a top of the line (Quad x64 CPU).

I had to replace the motherboard three times and then last month it died again.

So I said what the heck and decided to get a high end HP computer (i7 CPU).

I need to be doing 3D cad and 3D printing and CNC milling so thought I'd better get a upper level computer.

I haven't put Ubunto on it yet. I have a couple of older boxes that I could put Ubuntu on also.

I think other people here on the Nerdkits forum had reported that there was problems with the Prolific driver, I think they said it had reached it's end of life and that Prolific was no longer updating it. I tried the Windows 7 driver but it still does not work.

Hey Eric, thanks for that link that's about my attention span (5 minute video).

Ralph

January 07, 2013
by Ralphxyz
Ralphxyz's Avatar

Paul, thanks for that Windows 7 link but Windows 8 says This device cannot start. (Code 10)

Eric, thank you again that video was exactly what I was looking for. AVRfreaks had gotten me most of the way but I did not understand how to link the files now I do thanks to you!

Ralph

January 07, 2013
by Rick_S
Rick_S's Avatar

Ralph, you could get one of These or the eBay equivalent, use the ftdi header on the dev board and watch your driver/stray voltage issues go away.

Rick

January 07, 2013
by Ralphxyz
Ralphxyz's Avatar

Thanks Rick, I was thinking about somthing like that so I ordered a couple of them.

The driver/stray voltage issues were eliminated with the Optoisolation at least on the current board (of which I am having a strange problem that I will post on the thread.

I have three of the Nerdkits USB cables, oh well another thing for the NK guys to update.

I suppose they will have to come up with a new cable, one using a newer Prolific chip would work, hope they do not have a big inventory of the dated cables.

Ralph

February 08, 2013
by Ralphxyz
Ralphxyz's Avatar

Ralph, you could get one of These or the eBay equivalent, use the ftdi header on the dev board and watch your driver/stray voltage issues go away.

My FTDI module puts the same phampton power (1.7v) through the mcu and the power bus!!

If I have the FTDI module plugged in before putting power to the mcu a power led that I have lights.

If I have the FTDI plugged in power the mcu and run a program everything works fine BUT if I switch to programming mode (with power on running program) and then power off the mcu and then back on to program the program is still running I do not go to programming mode unless I pull the FTDI and re-power the mcu.

I believe sask55's opto-isolation circuit would still be the best for complete isolation.

I can live with this behavior but wanted to note that I am still getting phampton power and associated problems.

I am surprised that no one else sees this, well actually I should not be surprised as "things tend to happen to me" like my black bar problem.

Ralph

February 08, 2013
by Noter
Noter's Avatar

If you add a button on the reset pin and use it when switching to/from programming mode you will not have any more problems due to the "phantom power". I never toggle power when programming, just press the reset button.

February 08, 2013
by Ralphxyz
Ralphxyz's Avatar

Thanks Paul, I use the reset switch to go from programming mode to run mode but I have never seen it go from run mode to programming mode. I'll have to try it again.

Ralph

February 08, 2013
by Rick_S
Rick_S's Avatar

If I'm using the NK bootloader, I flip the program switch, then press reset. The MCU programs fine at this point. The to run, Flip the program switch back and reset again, then the code is running. With my board using the arduino bootloader full auto just like ICSP. The DTR line toggles reset at the appropriate time to make the bootloader do it's thing.

Rick

February 08, 2013
by Rick_S
Rick_S's Avatar

Hey Ralph, you're going to have to take some photo's & post them of your blizzard. How much they predicting for your neighborhood? 20+ inches or so??

February 08, 2013
by Ralphxyz
Ralphxyz's Avatar

Well so far, 7:22 pm we have gotten two to three inches but with rain for the past 2 hours.

"They" are projecting possible 24".

That would be nice, it will take me about two to three hours to snowblow my driveway and walkways.

I really love snowy winters.

Ralph

February 12, 2013
by Rick_S
Rick_S's Avatar

Ralph,

Just thought I'd let you know I did observe the behavior you talk about. In my newest board, I have a power indicator LED. With the USB/Serial adapter plugged in, if the power switch is in USB position, everything is powered normally, and the LED is on bright. If I move the switch to the EXTernal position, w/o external power connected, the LED is lit dimly. This indicates power feedback from the TX/RX or DTR lines.

I most likely never noticed this phenomena before because I didn't have Power indicator LED's on the earlier boards, and I rarely turn the power off. To program, I flip the program switch & hit reset. Then back to run, flip the switch back and reset again.

Looking at other boards on the net that utilize the FTDI connection like I have on my board, they don't even have power switches for the USB power line. So they would never exhibit this behavior.

I could add optical isolation, but there comes a point where you have to determine if the behavior is really a problem.

I ran into a similar situation on an industrial joystick controller I developed using a teensy. I split the power line from the USB off and fed it to an input on the micro. The USB data lines when to the micro as usual. I powered the circuit externally. However, if the external power wasn't applied the teensy would still run (Just not properly) with the USB connected because it was getting power into it's data lines. I left it alone. This board has been in service in the machine shop I work at for well over 2 Years.

If opto-isolation is important to you, it might make a great 1st Eagle project. FTDI in on one side, FTDI out on the other with the isolation between. Could be made on a very small board.

Rick

Rick

February 12, 2013
by Rick_S
Rick_S's Avatar

Oops on the double Rick Wink

February 12, 2013
by Ralphxyz
Ralphxyz's Avatar

Oh I thought that was a cheer, you certainly deserve one.

Occasionally I get the phantom mode where the mcu stays in run mode when the program/run switch is moved to program with the FTDI module plugged in. The only way I can program is to unplug the FTDI and repower the mcu.

I have a lot of circuits I'd like to do in Eagle I have been looking at Fritzing again they go from a breadboard to schematic to PCB, they even have there own fab house but the prices are nowhere as good as you are getting with iTeadStudio.

Ralph

February 12, 2013
by Rick_S
Rick_S's Avatar

Flipping the program switch under normal operation shouldn't do anything unless the program running has that pin set as an output and it is set high. Then it would create a dead short to ground. That makes me think having a resistor between the switch and ground might be a good idea so if someone did have that pin set high, the resistor would limit the current flow and prevent possible damage.

At any rate, if you didn't have the pin in use, once the program switch is flipped, a press of the reset should put the MCU into bootloader mode.

Rick

February 12, 2013
by Ralphxyz
Ralphxyz's Avatar

aha, I had PB0 in use!!

"prevent possible damage."

I just blew another (of many I might add) mcu yesterday while trying to program.

I have a serious collection of blown mcus, possible this is a lead.

So instead of the Nerdkit wire to ground to the switch I should have a resistor?

What size?

Ralph

Post a Reply

Please log in to post a reply.

Did you know that there are Power MOSFETs for switching big loads on and off? Learn more...