Loading...
  Show Posts
Pages: 1 ... 13 14 [15] 16 17 ... 21
211  Using Arduino / Programming Questions / Re: Programming in C on: November 23, 2012, 05:09:12 am
Fungus, I don't follow the logic of your post? I don't intend on programming C++ on a PC, all on MCUs?

Maybe it was my post about C: on PCs that misled you into thinking that? Dhenry had said one needed a good understanding of C: structure, and the colon made me thought he was referring to the structure of the C: directory of a PC, hence asking for clarification as I could not see how this was all so relevant.
212  Using Arduino / Programming Questions / Re: Programming in C on: November 23, 2012, 04:56:28 am
Right through from my childhood, my introductions & interests in engineering and concequently my education up until this point have all been in a mechanical discipline.

I'm in my final year of my Bachelors in an Automotive Mechanical degree right now actually - but over the last two and half years, my work has all been data & engine control engineering in motorsport with both a winning British GT team & BTCC team, and truthfully - my interests in a mechanical career are fading somewhat whilst an electronics career is looking ever more appealing.

I'm working as we speak on the hardware for a 2 cylinder ECU based around a 1284P, that supports dual wideband lambda, dual thermocouples, fly by wire throttle, extensive GP I/O, inductive & smart coil drive, saturated and peak & hold injector drive, USB - Serial etc... Most of the hardware knowledge has come from work, but as a personal project - I'm looking to first run a 2 cylinder generator as the test bed (by the time I get to the stage of working code I'll have left uni and won't have access to small dynos anymore) before running a 2 cylinder or twin engined kart with it, incorporating traction control, multi-mapping etc. Future hardware plans include comms protocols such as CAN etc.

Most of my work on clients vehicles has been with Pectel ECUs, second only to the likes of McLaren's TAG ECUs - so have extensive knowledge of how specific strategies are implemented for real world motorsport use, but am now incredibly interested in actually developing the code behind such strategies - as every now and then, would have liked the option of a somewhat different approach with a specific strategy, certainly for transient conditions.

Apologies for the life story, but hopefully it'll allow a better understanding of what I'm trying to learn for future use.

Quote
For a successful career in embedded programming, you need two things:

1) a good understanding of C: structure and write bug-free code;
2) ability to read and understand datasheets: 90% of programming a mcu is to operate those registers.

The stock C-functions are not that helpful.

When you say C: structure, are you referring to the structure of a typical C: drive on a PC? The colon makes me think so.
213  Using Arduino / Programming Questions / Re: Programming in C on: November 22, 2012, 07:41:05 pm
So, back on track...

Well technically there are NO standard functions in C/C++.  All functions need to be.

So, C++ is essentially an incredibly 'customisable' language for lack of a better expression, with functions included as either custom or standard libraries?

Instead of the standard libc, avr-gcc compiles in avr-libc for many of the "standard" C-type functions.

Please explain this statement a little more? I don't follow.
214  Using Arduino / Programming Questions / Re: Programming in C on: November 22, 2012, 06:51:51 pm
I shouldn't worry - I don't feel shouted at.

In the cores > arduino folder, which is the file that includes the source code for the functions such as digitalWrite?

Just downloading Notepad++ now to make things like this a little easier.
215  Using Arduino / Programming Questions / Re: Programming in C on: November 22, 2012, 06:23:23 pm
Ah... I alays thought it was C++ but the functions such as digitalWrite were "Arduino added" functions.

Things like Serial.begin, are they also standard C++ functions?

I suppose my question is now somewhat different, I believe the Arduino IDE allows one to omit certain parts that initialise things from a program?
216  Using Arduino / Programming Questions / Programming in C on: November 22, 2012, 06:14:02 pm
So, the Arduino platform introduced me to the world of digital electronics - both in terms of hardware and software.

I've got a good grip on hardware now I believe, and am currently working on a somewhat complex design for a project. However - I plan to start programming in C or C++ now as opposed to the Arduino programming language, to actually develop a 'real-world' skill I can add to my portfolio.

I believe the Arduino language is a type of C++, so - what's the recommendation? Start writing C or C++? Seems logical to start at C, before ++?

I know the AVRs can be programmed in C, is it the 'GNU' IDE/compiler or something, or C can also be written straight into Atmel Studio? ...but can they also be programmed in C++?

Does anybody know of a link to an Arduino blink sketch for example, shown right next to a C program to do exactly the same function?

Many thanks in advance
217  Using Arduino / Microcontrollers / Re: FT232RL to Atmega UART - is this correct? on: November 15, 2012, 06:26:44 pm
Just had a quick flick through the document referenced - I will have a proper read when I have time, but very useful indeed - thank you.

I see there's some bits in there re ESD diodes, series resistors on SPI pins (answered a question I was going to ask), and some good info about separating AVcc using a ferrite bead.

Also good info on how the decoupling I've always done, and how others do it - isn't quite the best way to do so.
218  Using Arduino / Microcontrollers / Re: FT232RL to Atmega UART - is this correct? on: November 13, 2012, 01:45:49 pm
You only get 500mA from USB, I don't if that's a concern.

Yep, I meant just to power the '232 chip, the rest of the board will still be powered by it's own regulated supply.
219  Using Arduino / Microcontrollers / Re: FT232RL to Atmega UART - is this correct? on: November 13, 2012, 01:13:07 pm
Okay, I understand now, thanks. I'll take a look into this, and how the old Duemillinovae boards had them wired up. Certainly the datasheet dosen't mention anything about it. I may also just swap my supply over to be powered by USB.
220  Using Arduino / Microcontrollers / Re: FT232RL to Atmega UART - is this correct? on: November 13, 2012, 11:42:20 am
What however do you mean by power the chip? Surely, having the chip powered is not an issue - unless it's in a tiny battery powered application?

Or are you saying that without series resistors, that when the TX pin 'powers' the '232, that doing so draws excessive current from the AVRs TX pin?

I have just searched the 232RL datasheet for the keywords 'ESD' & 'diode'.... no returns.

EDIT: Hang on, just a thought - now I'm completely lost. The TX pin of the processor goes to the RX pin on the '232, not the power supply pins, so how is this 'powering' happening?
221  Using Arduino / Microcontrollers / Re: FT232RL to Atmega UART - is this correct? on: November 13, 2012, 09:35:49 am
Quote
Also be aware that your Tx pin may actually power up the FTDI chip depending on how it is constructed.

That's not a problem - I'm not sleeping the '232 - just leaving it powered up the whole time.

Quote
The other thing to do is make sure your processor's Tx pin is tristate when the USB is not plugged in, if you can know that.

Why is this? Do both RX & TX go high when USB is unplugged? I know previously I've seen 1k series resistors on the RX and TX lines, but I believe the 232RL has internal series resistors?
222  Using Arduino / Microcontrollers / Re: FT232RL to Atmega UART - is this correct? on: November 13, 2012, 06:28:57 am
That's OK, as long as the GNDs are common.

_______
Rob

As in, even though I am not using the USB 5v, I must connect the USB GND to the boards GND for comms to work?
223  Using Arduino / Microcontrollers / Re: FT232RL to Atmega UART - is this correct? on: November 12, 2012, 03:54:35 pm
Just a thought, the 5V and GND shown on my schematic is not the 5V supply from the USB port, but rather 5V from the same regulator that powers all over 5V devices on the board.

Not using the 5v supply from the USB cable itself shouldn't be a problem should it?
224  Using Arduino / Microcontrollers / Re: Difference between EEPROM and flash memory on: November 11, 2012, 05:11:38 pm
For those lookup tables as part of my code, I'm happy to save these in the onboard flash using PROGMEM. I plan to use this external flash for logged data, but looks like I need to do some reading up on file systems, how to address certain bits of the flash etc etc. Any good reading links?

Going back to the quoted comment below, I do not follow the logic?

Please note that your going to end up coping everything to and from internal sram constantly so your not necessarily during yourself a favor trying to use offboard sram. 

Surely that's not particularly a problem, as I mentioned before - PCs for example use external RAM. Surely it's better to copy to external RAM, than to not and then run out of internal RAM?
225  Using Arduino / Microcontrollers / Re: Difference between EEPROM and flash memory on: November 11, 2012, 12:52:50 pm
Crossroads, we've got on to talking about using external flash to store logged data as opposed to SD cards.
Pages: 1 ... 13 14 [15] 16 17 ... 21