Maker Pro
Maker Pro

Need Advice please: microcontroller with RS-232 Output

A

alx3d

Jan 1, 1970
0
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 | |
| | |
|
---------------------------------------------------------------------------------------------------------------------
 
J

Joel Kolstad

Jan 1, 1970
0
alx3d said:
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?

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
 
J

Joerg

Jan 1, 1970
0
Hello Joel,
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.

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
 
A

Alex

Jan 1, 1970
0
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
 
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.
 
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!
 
D

David L. Jones

Jan 1, 1970
0
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.

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!
From the Microchip website:
"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 :)
 
M

martin griffith

Jan 1, 1970
0
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 | |
| | |
|
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
 
A

Alex

Jan 1, 1970
0
martin griffith said:
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



Thanks to all for your very appreciate help!

Alex
 
A

Alex

Jan 1, 1970
0
martin griffith said:
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

What is a 8052 ?
 
H

Howard Henry Schlunder

Jan 1, 1970
0
David L. Jones said:
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.

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.
 
J

John B

Jan 1, 1970
0
alx3d said:
I need some advice in designing a pushbutton interface to send commands via
RS-232 port.

No you don't. You need a UART or USART.
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

RS-422 is *not* the same as RS-232. You need a MAX489 interface or
equivalent.
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 | | |
| | |

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

Joerg

Jan 1, 1970
0
Hello Alex,
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?

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
 
M

martin griffith

Jan 1, 1970
0
What is a 8052 ?
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.
(www.amrai.com) compiler
People say that there are more 8051/2 in the world than any other
micro.


martin
 
M

Mike Young

Jan 1, 1970
0
Alex said:
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?

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.
 
J

Joel Kolstad

Jan 1, 1970
0
martin griffith said:
People say that there are more 8051/2 in the world than any other
micro.

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...
 
M

Mike Young

Jan 1, 1970
0
Joel Kolstad said:
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...

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

Gerhard

Jan 1, 1970
0
Joel Kolstad said:
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? Snip ..

The 8051/2 architecture was very popular in the Smartcard/cell phone SIM
market.
There were other contenders such as the Motorola HC08. There are other
processors
as well but PICs did not feature. The 8051/2 might therefor still be the
overall micro
volume leader.

Gerhard v d Berg

and it therefor might be
 
D

David L. Jones

Jan 1, 1970
0
Gerhard said:
The 8051/2 architecture was very popular in the Smartcard/cell phone SIM
market.
There were other contenders such as the Motorola HC08. There are other
processors
as well but PICs did not feature. The 8051/2 might therefor still be the
overall micro
volume leader.

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 :)
 
R

Richard Henry

Jan 1, 1970
0
People say that there are more 8051/2 in the world than any other
micro.

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.
 
Top