EmbeddedRelated.com
Forums

IO Question

Started by Mike Staines January 11, 2011
Hi, all!

I am a hobbyist and I picked up two Launchpads to start learning uPs in my retirement.

If I were to program the chip that came with the launchpad to just loop a program that toggled the state of a pin (i.e. pin = !pin), what is the minimum reasonable, ball park, SWAG, frequency should I expect to see on the pin? Can I get at least 1 MHz?

Thanks, in advance,
Mike

Beginning Microcontrollers with the MSP430

Depends what you expect to "SEE"

If you are referring to am LED, the average human eye can recognize and
count the flashes at 8 Hz.

________________________________

From: m... [mailto:m...] On Behalf
Of Mike Staines
Sent: Tuesday, January 11, 2011 1:30 AM
To: m...
Subject: [msp430] IO Question

Hi, all!

I am a hobbyist and I picked up two Launchpads to start learning uPs in
my retirement.

If I were to program the chip that came with the launchpad to just loop
a program that toggled the state of a pin (i.e. pin = !pin), what is the
minimum reasonable, ball park, SWAG, frequency should I expect to see on
the pin? Can I get at least 1 MHz?

Thanks, in advance,
Mike



Hey,

I am new to uP too. I am not sure about the frequency you can achieve but 1MHz seems reasonable. :)

Also, if you are just starting, the flashing the LED example is good. I just started with that. It flashes the green LED. Now I am trying to flash the red LED.

There is a magazine called Elektor which has some good examples related to MSP430 and other uPs. :)

Best regards,
Rajat

--- In m..., "Mike Staines" wrote:
>
> Hi, all!
>
> I am a hobbyist and I picked up two Launchpads to start learning uPs in my retirement.
>
> If I were to program the chip that came with the launchpad to just loop a program that toggled the state of a pin (i.e. pin = !pin), what is the minimum reasonable, ball park, SWAG, frequency should I expect to see on the pin? Can I get at least 1 MHz?
>
> Thanks, in advance,
> Mike
>

On Tue, Jan 11, 2011 at 12:04 PM, Hugo Brunert wrote:

> >> Depends what you expect to "SEE"
>
The square-wave output will be used to drive a class-D RF amplifier for a
> FCC "Part 15" (i.e. License free) transmitter. Assuming I can get at least
> 160 - 190 Khz pulses from it...
>

Regards,
Mike


Try working it out. 16MHz is the maximum clock frequency. so figure out
the fastest way to switch I/O using different addressing modes perhaps,
and then add 2 clocks for the jmp. generally you would do this with the
XOR instruction and select the output bit to be addressable using the CG
registers. This would give the following:-

L1:
XOR.B BIT0,&P1OUT ;4 CLKS
JMP L1 ; 2 CLKS

SO 12 CLOCK CYCLES OR 1.3333mhZ AT 16mHZ CLOCK AND 1mHZ AT 12mHZ CLOCK

AL

On 11/01/2011 4:59 PM, Mike Staines wrote:
> Hi, all!
>
> I am a hobbyist and I picked up two Launchpads to start learning uPs in my retirement.
>
> If I were to program the chip that came with the launchpad to just loop a program that toggled the state of a pin (i.e. pin = !pin), what is the minimum reasonable, ball park, SWAG, frequency should I expect to see on the pin? Can I get at least 1 MHz?
>
> Thanks, in advance,
> Mike
>
>
Rajat:

Thanks for your response. And for the pointer to Elektor!

Regards,
Mike

On Tue, Jan 11, 2011 at 3:03 PM, Raj27 wrote:

> Hey,
>
> I am new to uP too. I am not sure about the frequency you can achieve but
> 1MHz seems reasonable. :)
>
> Also, if you are just starting, the flashing the LED example is good. I
> just started with that. It flashes the green LED. Now I am trying to flash
> the red LED.
>
> There is a magazine called Elektor which has some good examples related to
> MSP430 and other uPs. :)
>
> Best regards,
> Rajat
>
> --- In m... , "Mike Staines"
> wrote:
> >
> > Hi, all!
> >
> > I am a hobbyist and I picked up two Launchpads to start learning uPs in
> my retirement.
> >
> > If I were to program the chip that came with the launchpad to just loop a
> program that toggled the state of a pin (i.e. pin = !pin), what is the
> minimum reasonable, ball park, SWAG, frequency should I expect to see on the
> pin? Can I get at least 1 MHz?
> >
> > Thanks, in advance,
> > Mike
> >
>


Thanks, Al!

So, it seems to be viable as a signal generator for the frequencies that I
am concerned with.

I will post my code for sharing as I advance this project.

Slightly-off-topic: With the MSP430 as an exciter, about 5 or 6 common parts
for an amplifier and 50 ft of wire you can make a small license-free
transmitter and antenna that can be heard many hundreds of miles away. Quite
a few people nationwide (U, S,) are playing there. I am just the first to
think of using the MSP430 as the exciter.

Mike

On Wed, Jan 12, 2011 at 1:26 AM, OneStone wrote:

> Try working it out. 16MHz is the maximum clock frequency. so figure out
> the fastest way to switch I/O using different addressing modes perhaps,
> and then add 2 clocks for the jmp. generally you would do this with the
> XOR instruction and select the output bit to be addressable using the CG
> registers. This would give the following:-
>
> L1:
> XOR.B BIT0,&P1OUT ;4 CLKS
> JMP L1 ; 2 CLKS
>
> SO 12 CLOCK CYCLES OR 1.3333mhZ AT 16mHZ CLOCK AND 1mHZ AT 12mHZ CLOCK
>
> AL
>
> On 11/01/2011 4:59 PM, Mike Staines wrote:
> > Hi, all!
> >
> > I am a hobbyist and I picked up two Launchpads to start learning uPs in
> my retirement.
> >
> > If I were to program the chip that came with the launchpad to just loop a
> program that toggled the state of a pin (i.e. pin = !pin), what is the
> minimum reasonable, ball park, SWAG, frequency should I expect to see on the
> pin? Can I get at least 1 MHz?
> >
> > Thanks, in advance,
> > Mike
> >
> >
> >
> >
> >
> >
> >
> >
Its viability depends on how much other processing you might need to do,
at 200kHz and 16MHz clock frequency you have 80 clock cycles per
modulation cycle, plenty to handle another interrupt if both are kept
short and clean. So you could implement your modulator using the timer
hardware and potentially handle some simple input devices at the same time.

Al

On 13/01/2011 9:53 AM, Mike Staines wrote:
> Thanks, Al!
>
> So, it seems to be viable as a signal generator for the frequencies that I
> am concerned with.
>
> I will post my code for sharing as I advance this project.
>
> Slightly-off-topic: With the MSP430 as an exciter, about 5 or 6 common parts
> for an amplifier and 50 ft of wire you can make a small license-free
> transmitter and antenna that can be heard many hundreds of miles away. Quite
> a few people nationwide (U, S,) are playing there. I am just the first to
> think of using the MSP430 as the exciter.
>
> Mike
>
> On Wed, Jan 12, 2011 at 1:26 AM, OneStone wrote:
>
>>
>> Try working it out. 16MHz is the maximum clock frequency. so figure out
>> the fastest way to switch I/O using different addressing modes perhaps,
>> and then add 2 clocks for the jmp. generally you would do this with the
>> XOR instruction and select the output bit to be addressable using the CG
>> registers. This would give the following:-
>>
>> L1:
>> XOR.B BIT0,&P1OUT ;4 CLKS
>> JMP L1 ; 2 CLKS
>>
>> SO 12 CLOCK CYCLES OR 1.3333mhZ AT 16mHZ CLOCK AND 1mHZ AT 12mHZ CLOCK
>>
>> AL
>>
>> On 11/01/2011 4:59 PM, Mike Staines wrote:
>>> Hi, all!
>>>
>>> I am a hobbyist and I picked up two Launchpads to start learning uPs in
>> my retirement.
>>> If I were to program the chip that came with the launchpad to just loop a
>> program that toggled the state of a pin (i.e. pin = !pin), what is the
>> minimum reasonable, ball park, SWAG, frequency should I expect to see on the
>> pin? Can I get at least 1 MHz?
>>> Thanks, in advance,
>>> Mike
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
Thanks, Al.

In my use, the modulation will be CW (Morse code). Since morse is a low
duty-cycle mode, I will have plenty of time to process things during the
"key-up" intervals (between dits and dahs).

Even using Bi-Phase Shift Keying (BPSK) should only require a couple of
clock cycles.

Appreciate your help!

Mike

On Wed, Jan 12, 2011 at 7:01 PM, OneStone wrote:

> Its viability depends on how much other processing you might need to do,
> at 200kHz and 16MHz clock frequency you have 80 clock cycles per
> modulation cycle, plenty to handle another interrupt if both are kept
> short and clean. So you could implement your modulator using the timer
> hardware and potentially handle some simple input devices at the same time.
>
> Al
>
> On 13/01/2011 9:53 AM, Mike Staines wrote:
> > Thanks, Al!
> >
> > So, it seems to be viable as a signal generator for the frequencies that
> I
> > am concerned with.
> >
> > I will post my code for sharing as I advance this project.
> >
> > Slightly-off-topic: With the MSP430 as an exciter, about 5 or 6 common
> parts
> > for an amplifier and 50 ft of wire you can make a small license-free
> > transmitter and antenna that can be heard many hundreds of miles away.
> Quite
> > a few people nationwide (U, S,) are playing there. I am just the first to
> > think of using the MSP430 as the exciter.
> >
> > Mike
> >
> > On Wed, Jan 12, 2011 at 1:26 AM, OneStone>
> wrote:
> >
> >>
> >> Try working it out. 16MHz is the maximum clock frequency. so figure out
> >> the fastest way to switch I/O using different addressing modes perhaps,
> >> and then add 2 clocks for the jmp. generally you would do this with the
> >> XOR instruction and select the output bit to be addressable using the CG
> >> registers. This would give the following:-
> >>
> >> L1:
> >> XOR.B BIT0,&P1OUT ;4 CLKS
> >> JMP L1 ; 2 CLKS
> >>
> >> SO 12 CLOCK CYCLES OR 1.3333mhZ AT 16mHZ CLOCK AND 1mHZ AT 12mHZ CLOCK
> >>
> >> AL
> >>
> >> On 11/01/2011 4:59 PM, Mike Staines wrote:
> >>> Hi, all!
> >>>
> >>> I am a hobbyist and I picked up two Launchpads to start learning uPs in
> >> my retirement.
> >>> If I were to program the chip that came with the launchpad to just loop
> a
> >> program that toggled the state of a pin (i.e. pin = !pin), what is the
> >> minimum reasonable, ball park, SWAG, frequency should I expect to see on
> the
> >> pin? Can I get at least 1 MHz?
> >>> Thanks, in advance,
> >>> Mike
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
>
> >>>
> >>>
Sounds interesting
I would never have thought to use an msp430 for morse
When u r done can u post the code I would like to try it
Thanks
Juan Carlos
Sent via BlackBerry by AT&T

-----Original Message-----
From: Mike Staines
Sender: m...
Date: Wed, 12 Jan 2011 22:07:05
To:
Reply-To: m...
Subject: Re: [msp430] IO Question

Thanks, Al.

In my use, the modulation will be CW (Morse code). Since morse is a low
duty-cycle mode, I will have plenty of time to process things during the
"key-up" intervals (between dits and dahs).

Even using Bi-Phase Shift Keying (BPSK) should only require a couple of
clock cycles.

Appreciate your help!

Mike

On Wed, Jan 12, 2011 at 7:01 PM, OneStone wrote:

> Its viability depends on how much other processing you might need to do,
> at 200kHz and 16MHz clock frequency you have 80 clock cycles per
> modulation cycle, plenty to handle another interrupt if both are kept
> short and clean. So you could implement your modulator using the timer
> hardware and potentially handle some simple input devices at the same time.
>
> Al
>
> On 13/01/2011 9:53 AM, Mike Staines wrote:
> > Thanks, Al!
> >
> > So, it seems to be viable as a signal generator for the frequencies that
> I
> > am concerned with.
> >
> > I will post my code for sharing as I advance this project.
> >
> > Slightly-off-topic: With the MSP430 as an exciter, about 5 or 6 common
> parts
> > for an amplifier and 50 ft of wire you can make a small license-free
> > transmitter and antenna that can be heard many hundreds of miles away.
> Quite
> > a few people nationwide (U, S,) are playing there. I am just the first to
> > think of using the MSP430 as the exciter.
> >
> > Mike
> >
> > On Wed, Jan 12, 2011 at 1:26 AM, OneStone>
> wrote:
> >
> >>
> >> Try working it out. 16MHz is the maximum clock frequency. so figure out
> >> the fastest way to switch I/O using different addressing modes perhaps,
> >> and then add 2 clocks for the jmp. generally you would do this with the
> >> XOR instruction and select the output bit to be addressable using the CG
> >> registers. This would give the following:-
> >>
> >> L1:
> >> XOR.B BIT0,&P1OUT ;4 CLKS
> >> JMP L1 ; 2 CLKS
> >>
> >> SO 12 CLOCK CYCLES OR 1.3333mhZ AT 16mHZ CLOCK AND 1mHZ AT 12mHZ CLOCK
> >>
> >> AL
> >>
> >> On 11/01/2011 4:59 PM, Mike Staines wrote:
> >>> Hi, all!
> >>>
> >>> I am a hobbyist and I picked up two Launchpads to start learning uPs in
> >> my retirement.
> >>> If I were to program the chip that came with the launchpad to just loop
> a
> >> program that toggled the state of a pin (i.e. pin = !pin), what is the
> >> minimum reasonable, ball park, SWAG, frequency should I expect to see on
> the
> >> pin? Can I get at least 1 MHz?
> >>> Thanks, in advance,
> >>> Mike
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
>
> >>>
> >>>