![]() |
![]() |
![]() |
|
|
|||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
|
|
Thread Tools | Display Modes |
|
|
(permalink) |
|
Is it possible to make a program and choose uC afterwards?
__________________
Simplicity rules Good enought - its perfect ?? 2 Gig of free online backup space Are you a Chemist? |
|
|
|
|
|
|
(permalink) |
|
Yes, as long as you choose the uC that you wrote the code for!
|
|
|
|
|
|
|
(permalink) | |
|
Quote:
I would think of it as more of a neat trick than something you'd want to actually do. And it certainly would be easier for a beginner to just rewrite the code for each target uC. It might be realistic for a large codebase which needs to have the ability to use newer versions of an architecture while maintaining compatibility with existing/older ones. Then again, it might not*. Torben [Edit: *: Then again #2: but that's not really the same thing as having one codebase target i.e. AVR, PIC, and Z80 anyway.] Last edited by Torben; 31st January 2008 at 08:21 PM. |
||
|
|
|
|
|
(permalink) |
|
well if i choos a PIC family (i.e PIC16FXXXX) does they have the same set of instructions? When using C code?
__________________
Simplicity rules Good enought - its perfect ?? 2 Gig of free online backup space Are you a Chemist? |
|
|
|
|
|
|
(permalink) | |
|
Quote:
See two cases are there... if you write in c language then you can change your microcontroller whenever you want... from pic to avr to zilog to anyone... when you want to choose a microcontroler among any of the pic then you can write the program in both assembly and C and then can choose the microcontroller... All you need is to change the include (header) file on changing the controller... Regards, Simran..
__________________
Simran.. 8051 Specialist.. |
||
|
|
|
|
|
(permalink) |
|
Ok well i see i need to specify my questions better
This is what i asked on the top !! Edit: What program do you sugest for making the firmware??
__________________
Simplicity rules Good enought - its perfect ?? 2 Gig of free online backup space Are you a Chemist? Last edited by Kryten; 8th February 2008 at 11:46 AM. |
|
|
|
|
|
|
(permalink) | |
|
Quote:
You can write code targetted at a range of uCs, as long as the code works within spec on all of them. Writing code which could run equally well on an 8051, a PIC, or an ATMEGA would be worth it only if the program didn't rely on any of the advanced features of any of the uCs. Choose the environment and code to it. Within a family (like PICs) you could do some makefile magic to make it work, but I don't think it would be worth it. Torben |
||
|
|
|
|
|
(permalink) |
|
You need to bear in mind that while C is far more portable than assembler, it's not really that portable, particularly for micro-controllers, where their specific requirements modify the language accordingly.
|
|
|
|
|
|
|
(permalink) | |
|
Quote:
Torben |
||
|
|
|
|
|
(permalink) |
|
Well Sir,
I feel it is a good habit of using the assembly language... C is a good language but at least you have to master one industry microcontroller first... hence start with assembly... Regards, Simran..
__________________
Simran.. 8051 Specialist.. |
|
|
|
|
|
|
(permalink) |
|
Yes sir Simran. In school we have used ASMide with the MC68HC11 (thats with Assembly code)
So am familiar with assembly coding.. Have just started C programming now the easy stuff such as definng the different Analog inputs and setting the AD converter on them
__________________
Simplicity rules Good enought - its perfect ?? 2 Gig of free online backup space Are you a Chemist? |
|
|
|
|
|
|
(permalink) | |
|
Quote:
Im aiming at using the PIC16 family as i need a ADC that has hig resolution cos im measuring 100A @ 2.5V (hmm must aplify it a bit )
__________________
Simplicity rules Good enought - its perfect ?? 2 Gig of free online backup space Are you a Chemist? |
||
|
|
|
|
|
(permalink) | ||
|
Quote:
Quote:
Torben |
|||
|
|
|
|
|
(permalink) | |
|
Quote:
__________________
Simplicity rules Good enought - its perfect ?? 2 Gig of free online backup space Are you a Chemist? |
||
|
|
|
|
|
(permalink) | |
|
Quote:
What is the budget for this project? There are things out there called SBCs (single-board computer) and SOMs (system on module) which include a processor and several peripherals such as serial, USB, and I/O ports; SD card drives; higher-resolution ADCs etc--but the ones I know about start at around $100 US. Depends on your budget and how much of it you want to do yourself, really. Torben |
||
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Latest |
| Question about Inchworm+ | Quan | Micro Controllers | 54 | 28th October 2007 12:20 AM |
| UNIT Committment solution using Dynamic programming | arijit18 | Electronic Projects | 1 | 18th October 2007 08:27 PM |
| my first 16F88 has me stumped | Hank Fletcher | Micro Controllers | 15 | 3rd August 2007 03:21 PM |
| Programming languages | sram | General Electronics Chat | 9 | 2nd March 2007 04:14 PM |
| Good Computer Programming Book | ThermalRunaway | Chit-Chat | 21 | 16th September 2005 10:05 PM |