Need Advice please: microcontroller with RS-232 Output

You can pretty much 'bit bang' (write software to sent out the bits) 38.4kbps on any common microcontrollers these days. Additionally, all but the 'smallest' (feature set-wise) microcontrollers come with a hardware serial port as well. You might as well chose an Atmel AVR, a TI MSP430, or a Microchip PIC -- all of these are easily available, have tons of resources freely found on the Internet, etc. PICs have been around longer so there's no problem finding lots of proto boards and help, AVRs have a nicer architecture and are almost as popular, whereas MSP430s are a little more nichey and therefore not quite as prevalent.

For what you want to do, even a (PIC-based) BASIC stamp would work fine and you could be finished with your project in an evening.

---Joel Kolstad

Reply to
Joel Kolstad
Loading thread data ...

I need some advice in designing a pushbutton interface to send commands via RS-232 port.

I need to find a microcontroller that will take pushbutton inputs and send the proper commands (Sony Protocol of remote-1) via RS-232 to a digital video recorder board.

Any advice on the proper microcontroller that I have to use?

Thank's in advance for your help!

Alex

ELECTRICAL INTERFACE:

- EIA RS-422

DATA FORMAT :

- 38.4 kbps

- Asynchronus, full duplex communications

- 8 data bits, odd parity, 1 stop bit.

COMMAND BLOCK FORMAT

--------------------------------------------------------------------------------------------------------------------- | 1 byte | 1 byte | 1 byte | n-2 byte | 1 byte | 1 byte | | Bits 7-4 Bits 3-0 | | | | | |

--------------------------------------------------------------------------------------------------------------------- | CMD-1 | DATA | CMD-2 | DATA-1 | - - - | DATA-n | CHECKSUM | | | COUNT | | | | | |

---------------------------------------------------------------------------------------------------------------------

Reply to
alx3d

Chances are you're going to end up with a uController that has more features than you require. A good 'all-around" PIC is 16F877A. It comes in a DIP package so you don't have to be concerned with prototyping SMT parts. Just my 2 cents....if you want to program in C then I suggest using an 18F part that way you can download and use the PIC18 C compiler instead of trying to find a third party compiler for the 16 series. Sounds like an interesting and very straight forward little project.

Reply to
warrenphd

Also, you'll need a Maxim MAX232A part or an equivalent RS-232 transceiver chip. If I remeber correctly, this part should have enough I/O for hardware handshaking.....if your application requires it!

Reply to
warrenphd

Thanks for you response!

I've check on the Microchip website for Pic Microcontrollers, there's a lot of product ! How can I choose the microcontroller that will fit my needs?

Alex

"Joerg" a écrit dans le message de news: 3Czaf.9449$ snipped-for-privacy@newssvr21.news.prodigy.com...

Reply to
Alex

HiTech have a free version of their PIC-C 16 compiler that supports limited devices.

I haven't checked the PIC18 C compiler since it's release but it now looks like it is "almost" free!

"The Student Edition has all the features of the full compiler and libraries. After 60 days, the optimizations related to procedural abstraction and to the extended instruction set of the newer PIC18XXXX devices will be disabled. Code compiled after the expiration date will function but may occupy more memory space."

Has anyone had any experience with how much it "cripples" the code after the expiry date? Is code size the only penalty? If so then that's a very livable limitation.

Why don't they just give the thing away??

Dave :)

Reply to
David L. Jones

Hello Joel,

Just a slight addition: You also need to worry about signal levels and number of handshake lines the recorder board expects. So there has to be an additional driver chip (easy) and maybe a couple extra voltages (might not be so trivial).

Regards, Joerg

formatting link

Reply to
Joerg

I did this in the early 90's with an 8052, no problems. we even did 2 machine frame accurate video editing, by multiplexing the serial port.

martin

Reply to
martin griffith

"martin griffith" a écrit dans le message de news: snipped-for-privacy@4ax.com...

Thanks to all for your very appreciate help!

Alex

Reply to
Alex

"martin griffith" a écrit dans le message de news: snipped-for-privacy@4ax.com...

What is a 8052 ?

Reply to
Alex

Yeah, code size is the only penalty. From my interpretation of the EULA, commercial use of the "student" compiler is currently permitted. As a positive side effect, the code will run faster with procedural abstraction disabled. This could translate into unexpected power savings if you were unaware of what procedural abstraction was doing, and thus, did not manually disable it prior.

Actually, code size isn't the only penalty. You have to put up with the extra messages that the student compiler emits every time it is invoked, stating that you are using the student compiler. This isn't a big deal, but it is slightly annoying when you are looking for compiler warnings and error messages, which you do care about.

Reply to
Howard Henry Schlunder

No you don't. You need a UART or USART.

RS-422 is *not* the same as RS-232. You need a MAX489 interface or equivalent.

---------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------------------

I would advise using an ATmega8 with a 7.3728MHz crystal. It'll do the job perfectly.

--
John B
Reply to
John B

Hello Alex,

The usual way. I am currently doing that for two other projects. First, pick a target price limit. Then go through the lists of the major mfgs (TI, Atmel Microchip etc.) and check the specs. Piece by piece. That can take days if you want to really minimize cost and maximize integration (which I usually have to do...). If cost isn't a big deal you can pick a uC that just "has it all".

As Warren wrote, you'll most likely end up with a uC that can do a bit more than you really need. How much more depends on the time you invest reading data sheets and comparing budgetary prices.

Regards, Joerg

formatting link

Reply to
Joerg

It is a 30year old generic family, orginally from Intel, look on Atmels' site for 8 bit micro's, there are manyvariation, and it continues to be well supported. Try the demo of theRaisonance C.

formatting link
compiler People say that there are more 8051/2 in the world than any other micro.

martin

Reply to
martin griffith

The product matrix is pretty obtuse until you figure out what features the various acronymns represent, and what use you might have for them. I suggest getting the PICkit2 and learn your way around a moderately full featured chip. The kit comes with a 16F690, which has an onboard usart. The only problem with the '690 is the lack of freebie C compiler support. HiTech's freebie compiler supports the 16F684, a slightly less featured chip (no uart; bit-banging sucks if you have to code it, but there's plenty of published code that works). CCS sells a not unreasonably priced compiler for mid-range PICs, including the '690. The CCS PCM is my suggestion, but don't take this as a hearty recommendation. The assembler and basic development tools are free downloads from Microchip. (Basic meaning rudimentary, not the language.)

You'll still need a converter chip to send and receive EIA 422. See Maxim's site for their interface products. All operate on a single +5V source (which is rather the point of interface chips). If it's really RS-232 you want, the MAX232A is the one to get. Note the 'A'. The non-A version requires larger caps for the charge pumps, if that's a concern.

Reply to
Mike Young

If this is the case, it's probably only because there have always been so many PIC part numbers, even though they use the same core? Kinda like the Genius Book of World Records saying that the Commodore 64 was the most popular computer ever sold, because it considers an HP Pavilion PC somehow different than a Dell Inspiron...

Reply to
Joel Kolstad

Outselling Dell anything is indeed something to brag about. I don't believe that they did, though.

Reply to
Mike Young

I doubt it. The PIC hit #1 in volume in around 2002, and even then the 8051 was well down the pack. It has been in continual decline for many years now. I think Atmel are now claiming the lead?

PICs are used extensively in smart cards too.

Dave :)

Reply to
David L. Jones

Somewhere I read that if you consider all the microprocessors in the world, the proportion of those that are the central processing units of personal computers, rounded to the nearest percent, is 0.

Reply to
Richard Henry

via

-------------------------------------------

-------------------------------------------

-------------------------------------------

As long as we are looking for interfaces, I need a micro that has a hardware serial port on one side and an I2C bus on the other, and not much else. I'll even settle for a non-micro dedicated piece of hardware (or hard-coded micro disguised as a piece of hardware). Bonus points will be awarded for including the EIA-232 (or even EIA-422) hardware drivers and receivers.

**Note** EIA (Electronic Industries Association) has replaced RS (Recommended Standard) in the name of many standards. Don't fell bad if you mixed them up - the Wikipedia article on EIA-422 starts out with "formerly RS-422", but later makes a reference to "RS-232".
Reply to
Richard Henry

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.