Which language for control software for pre

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
I am not sure where to ask this so I will start here. I have a preamp that I built and I am very happy with the sound. Now I want to make by own control system for it. I am willing to spend the time learning the programming language I just don't know which is best. I want to have remote control for volume and selection. I also want to use a DS1666 chip for volume control and have the ability to use a 7 segment LED display at the worst or a graphic display if it is not too expensive. So do I use a basic stamp or???
 
Last edited:
I have used PICs for that. When decoding IR the timing is critical, and for that I use assembly. The free C compilers can generate quite a lot of redundant code which sometimes messes up precision timing.

Everyone will have their own preference though, for Microchip, Atmel or something else.
There are quite a few 'ready written' blocks of IR receiver code for both those processors on the WWW, so you might not have to learn any at all.
Mostly these projects seem to use Philips RC5 or Sony SIRC handset protocols.

The 16x2 line LCD dot-matrix displays are quite cheap now, and again, ready written blocks of code to talk to them exist on the www. Personally, I much prefer 7-seg LED or Starburst LEDs - you can read them from across the room. LCDs I can't read from further than a metre.
 
Last edited:
I would recommend C, as the majority of embedded work is done in C. I would start stumbling through C on the windows side. There's plenty to get you up and going for free. Lots of online documentation on how to do just about anything.

Once you get used to the flow of programming get your chip flashing some lights based on internal timers. It's pretty big jump from windows to embedded software, but it's pretty darn neat to see that light flash CORRECTLY for the first time! You might run into some assembly, and it will be good to understand what is going on, on that level of the chip.

There are a few different chips to chose from. Atmel is very popular along with the PIC stuff. At work we use SiLabs 8051 core chips, simple 8-bit guys. Find a development kit in your price range and run with it.
 
C is the language of choice for this type of embedded work. For something like you describe, you can almost certainly get away without writing a single line of assembly code.

PICs are popular here, but I would recommend to have a look at the SiLabs 8051 based chips :cool:. They have quite a variety of on-chip peripheral configurations, which can simplify things greatly. Their ToolStick development platforms are very inexpensive and very easy to get started with.

Good luck
 
C was designed as a system programming language, so it fits right within your project. Assembly code is recommended only when you really need the speed. And C++ is OK, so long as you use it to write C (there are rumours the C++ template syntax can be used to summon eldritch creatures from the vasty deep... Ia! Ia! Cthulhu f't'agn!... erm, ah, do unexpected things).
 
C was designed as a system programming language, so it fits right within your project. Assembly code is recommended only when you really need the speed. And C++ is OK, so long as you use it to write C (there are rumours the C++ template syntax can be used to summon eldritch creatures from the vasty deep... Ia! Ia! Cthulhu f't'agn!... erm, ah, do unexpected things).

With C++ there is too much stuff going on magically behind the scenes for my taste. If you must use C++, consider Embedded C++. Not recommended for first embedded language to learn, though :).

Cheers,
 
With C++ there is too much stuff going on magically behind the scenes for my taste. If you must use C++, consider Embedded C++. Not recommended for first embedded language to learn, though :).

Ayup. C++ has way too many moving parts for something like the OP's request. I got into it only when I desperately needed some of the constructs, but learning it as a first language is like learning how to drive stick in a loaded semi-trailer.
 
Hi danzup,

Looking at the code from the other thread I couldnt see much code handling rc5. Does the bascom compiler have a rc5 library?

örjan

Yes ,it has function Getrc5(Address , Command) also a Sendrc5( ) also functions for RC6 ( get and send ) .
In the help file explain how to use it .
There are a lot of function ready made and you just call it and use the result !
Nice feature for short time coding !!!
 
Im partiall to C. check out mikroC - Advanced C compiler for PIC microcontrollers
mikroElectronika has a free demo version (limit 2KB of code) for all its compilers (c,basic,delphi)for multiple micros (pic, atmel,psoc etc...) they have built in libraries for so many things like LCD,graphical LCD, serial communication, I2C, USB, USART et... it helped me develope things i never thought i could. I am over 80% completed a Integrated amp with graphical lcd, RC5 encoding, optical encoder, digital volume etc... which i will be posting here soon for suggestions before i send the gerber files out to make the PCB's.

best of luck

Dave
 
Dave,

I wish I had seen this sooner. I am using a BS2 Basic Stamp for learning. Its more powerful then I thought and the support from Parallax is great. Hopefully it will be powerful enough. I have the Sony RC code part done. Now I am working on the LCD with touch screen interface.

John
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.