| Author |
Message |
crip
Joined: 10 Dec 2003 Posts: 5
|
11 Dec 2003 14:26 Which Programming Language do i need for... |
|
|
|
|
programming a counter for a creditcard-device. The device needs to count +1 everytime a card goes through the slot.
Hope, everybody understands what i need to know!
THX, crip
|
|
| Back to top |
|
 |
mrcube_ns
Joined: 10 Apr 2002 Posts: 429 Helped: 11 Location: Dark side of the Moon
|
11 Dec 2003 15:46 Re: Which Programming Language do i need for... |
|
|
|
|
It's very simple program. You can use any program (asembler, basic, c ) it is just a few lines of code.
Mr.Cube
PS. what controller?
|
|
| Back to top |
|
 |
Al Farouk
Joined: 13 Jan 2003 Posts: 195
|
11 Dec 2003 15:51 Re: Which Programming Language do i need for... |
|
|
|
|
| I did not fully understand, but the choice will depent on the implementation of the design. do you use controller, FPGA, ... or waht. according to the design type the programming language will be defined automatically
|
|
| Back to top |
|
 |
crip
Joined: 10 Dec 2003 Posts: 5
|
11 Dec 2003 16:57 Re: Which Programming Language do i need for... |
|
|
|
|
First of all THX to u guys, but to be honest. I donīt even know what a controller is.
Which is the best solution for that one and how do i programm the code?What kind of interface or software do i need for asembler or basic?
C-U, crip
|
|
| Back to top |
|
 |
ME
Joined: 14 Mar 2002 Posts: 1523 Helped: 13
|
11 Dec 2003 17:53 |
|
|
|
|
I doesn't semms like you know much about programming.
Which languages do you know, if any?
A Microcontroller is a microprocessor with internal program memory and some extra pheripehals included.
|
|
| Back to top |
|
 |
crip
Joined: 10 Dec 2003 Posts: 5
|
11 Dec 2003 21:00 Re: Which Programming Language do i need for... |
|
|
|
|
I know Java, PHP, ASP, XML and some more. But what i donīt know is how to programm a hardware device that counts how many card have been in it, like a creditcard counter?
crip
|
|
| Back to top |
|
 |
ME
Joined: 14 Mar 2002 Posts: 1523 Helped: 13
|
11 Dec 2003 21:53 |
|
|
|
|
It would reccomend that you learn C language, you can get C compilers for most MCUs.
The easiest way is to learn how to program your PC in C before you start to do embedded C programming. You can make simple dos C programs to run at your PC.
There are several C compilers for PCs.
Microsof Visual Studio .NET or Borland C compiler are good choices to learn C programming.
I don't know Java myself, but only C, C++ and Assembler.
I think you will soon catch up with C programming if you can program in JAVA.
Most microcontollers are programmed in C or Assembly. Some hobby users program in Basic.
The best way to start C programming is to get a good book about C programming and do the exercices from the book.
There are some C books uploaded here at elektroda.
This book is a good reference book for C, but it is not good for learning C.
The C programming Language by Ritchie and Kernighan:
http://www.elektroda.pl/eboard/searchtopic51807-ritchie.html
This book was written by the inventors of C: Ritchie and Kernighan.
I'm not sure what is the best learning book, there are several books to choose from.
What should the counter do?
How do you want to display and/or store the counter value?
If you want a simple counter which can display the value at 7-segment displays, then you don't even need to program a microcontroller.
You can get complete digital counter ICs from the 74xx or 4xxx logic families.
|
|
| Back to top |
|
 |
ME
Joined: 14 Mar 2002 Posts: 1523 Helped: 13
|
12 Dec 2003 0:21 |
|
|
|
|
Here are some descriptions of some of the differences between C/C++ and JAVA:
http://www.particle.kth.se/~lindsey/JavaCourse/Book/Supplements/Chapter02/JavaVsC.html
http://www.oreilly.com/catalog/javanut/excerpt/index.html
|
|
| Back to top |
|
 |
zhu_bin
Joined: 10 Dec 2003 Posts: 8
|
12 Dec 2003 3:20 Re: Which Programming Language do i need for... |
|
|
|
|
I don't know what kind of card you used.
But I think C and JAVA will help
|
|
| Back to top |
|
 |
crip
Joined: 10 Dec 2003 Posts: 5
|
12 Dec 2003 9:44 Re: Which Programming Language do i need for... |
|
|
|
|
Thanks to you guys. This really helps me a lot!
Ok, now i know the language (C, Java, Asembler) and i know that an IC could make it too. But how do i connect the IC or any other device to the PC? Do i need a special interface for that? How do i say the IC through C/C++ to count one up? Do i have to build it on my own?
Do you know some other links?
crip
|
|
| Back to top |
|
 |
Antharax
Joined: 01 Jan 1970 Posts: 227 Helped: 13
|
12 Dec 2003 10:41 Re: Which Programming Language do i need for... |
|
|
|
|
Probably the easiest way to communicate between hardware and software is through UART/RS232/Serial Port. You should be able to find java examples to access the serial port on your PC-platform.
For the microcontroller you should choose one with UART. It's not that difficult to send a few bytes over the serial port using C.
Antharax
|
|
| Back to top |
|
 |
ME
Joined: 14 Mar 2002 Posts: 1523 Helped: 13
|
12 Dec 2003 12:19 |
|
|
|
|
As microcontroller I would reccomend to use an 8-bit. Atmel AVR or Microchip PIC with UART are probably the best choices,. They are both Flash devices which can be reprogrammed. You can use ISP (In Circuit Programming) of the MCU.
I think you should program the MCU in C.
On the PC side you can program in either C, C++, C# or JAVA.
But you haven't told what the functionality should be.
Are you going to store the counter value in the MCU or will you always have a PC connected and display it at a monitor?
Are you going to display the data without a PC connected?
|
|
| Back to top |
|
 |
enigma460
Joined: 28 Dec 2001 Posts: 76 Helped: 3
|
12 Dec 2003 19:27 Re: Which Programming Language do i need for... |
|
|
|
|
Since you have Java Programming experience, there's no need to learn another laugauge.
You can get a Java programmable Micro from HVW for $89US.
Check it out at www.hvwtech.com
Have fun.
Enigma460
|
|
| Back to top |
|
 |
robertino
Joined: 10 Nov 2003 Posts: 1
|
13 Dec 2003 10:55 Re: Which Programming Language do i need for... |
|
|
|
|
| ?? only counting every C.Card inserted or some other task (only some C.card,) ecc.. ??
|
|
| Back to top |
|
 |
Google AdSense

|
13 Dec 2003 10:55 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
dipchip
Joined: 07 May 2001 Posts: 55
|
13 Dec 2003 16:06 Re: Which Programming Language do i need for... |
|
|
|
|
| Based on the discussion so far I would sugest that you acquire a simple micro development board with normal components. Once you understand how to use the board and software, I think that most of you questions will be answered. I would suggest that you get one of the standard offerings based on the 8051, PIC, or AVR series of micros.
|
|
| Back to top |
|
 |
ME
Joined: 14 Mar 2002 Posts: 1523 Helped: 13
|
13 Dec 2003 17:52 Re: Which Programming Language do i need for... |
|
|
|
|
| dipchip wrote: |
| Based on the discussion so far I would sugest that you acquire a simple micro development board with normal components. Once you understand how to use the board and software, I think that most of you questions will be answered. I would suggest that you get one of the standard offerings based on the 8051, PIC, or AVR series of micros. |
I have an Atmel AVR STK500 starter kit:
http://www.atmel.com/dyn/products/tools_card.asp?tool_id=2735
This is the best microcontroller starter kit I have seen.
|
|
| Back to top |
|
 |
mrcube_ns
Joined: 10 Apr 2002 Posts: 429 Helped: 11 Location: Dark side of the Moon
|
14 Dec 2003 1:03 Re: Which Programming Language do i need for... |
|
|
|
|
You can use PIC16F627.
Download Hi-tech PICC lite its free for that mcu (w*w.htsoft.com).
On net you can find many programmers for 16F627.
Mr.Cube
|
|
| Back to top |
|
 |
crip
Joined: 10 Dec 2003 Posts: 5
|
15 Dec 2003 9:35 Re: Which Programming Language do i need for... |
|
|
|
|
OK, THX you all for the help. I will check out the links you gave me and come back.
Bye, crip
|
|
| Back to top |
|
 |
Moonygals
Joined: 10 Nov 2003 Posts: 1
|
23 Dec 2003 3:30 Re: Which Programming Language do i need for... |
|
|
|
|
to program to pic , you also can download MPLAB IDE from microchip.com
. Its emulator is also available.
BR.,
deimos
|
|
| Back to top |
|
 |