Sign in

username:

password:



Not a member?

Search basicx



Search tips

Subscribe to basicx



basicx by Keywords

Accelerometer | ADC | ADXL | Adxl20 | AVR | BasicStamp | BX-35 | BX28 | BX35 | COM3 | Compiler | Downloader | EEPROM | Electromagnet | GetADC | GP2D1 | GPS | I2C | IDE | Keypad | LCD | LCD+ | MIDI | Motors | Multitasking | Netmedia | Networking | PCB | PID | PlaySound | PWM | Relays | RTC | Servo | ShiftOut | SitePlayer | SPI | Stack | Timer | USB

Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | BasicX | Seperate Pulsetrain into individual channel

Discussion forum for the BasicX family of microcontroller chips.

Seperate Pulsetrain into individual channel - phuo...@yahoo.com - Mar 18 13:57:58 2009



Hi everybody,

I have question about seperating a pulsetrain into individual channels. I use the outputcapture to generate a pulsetrain that consists 4 different channels. I want to seperate this pulsetrain into 4 corresponding channels. There is a suggestion to use demuxplexer to do that. But I do not know how to do that. Can anyone give me instruction about this issue.

Thanks,
Pthien,
------------------------------------



(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )


Re: Seperate Pulsetrain into individual channel - Tom Becker - Mar 18 15:20:06 2009

> ... seperate this pulsetrain into 4 corresponding channels...

A shift register can do that. Use the output capture clock pin to clock
the shift register and feed your composite data pin to its serial
input. Each channel time period will appear at the outputs pins.
That's how RC receivers used to decode PPM.

Tom
------------------------------------

______________________________
controlSUITE™ software. Comprehensive. Intuitive. Optimized.
Real-world software for real-time control. Details Here!



(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: Seperate Pulsetrain into individual channel - phuocthienhk2001 - Mar 19 0:31:15 2009


Thanks for your suggestion. I found a shift register namely MM74HC595. Hope that I can reach this device this afternoon, so that I can try PWM seperation.

Best,

Pthien

- In b...@yahoogroups.com, Tom Becker wrote:
>
> > ... seperate this pulsetrain into 4 corresponding channels...
>
> A shift register can do that. Use the output capture clock pin to clock
> the shift register and feed your composite data pin to its serial
> input. Each channel time period will appear at the outputs pins.
> That's how RC receivers used to decode PPM.
>
> Tom
>

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



(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: Seperate Pulsetrain into individual channel - Huynh Phuoc Thien - Mar 19 1:14:27 2009

Hi Tom,

Can I ask about the Output capture clock Pin. I look at the description of BX24 Pins, but I could not find the Ouputcapture Pin. Can you help me.
Thanks,

Pthien

--- On Wed, 3/18/09, Tom Becker wrote:

From: Tom Becker
Subject: Re: [BasicX] Seperate Pulsetrain into individual channel
To: b...@yahoogroups.com
Date: Wednesday, March 18, 2009, 12:19 PM

> ... seperate this pulsetrain into 4 corresponding channels...

A shift register can do that. Use the output capture clock pin to clock
the shift register and feed your composite data pin to its serial
input. Each channel time period will appear at the outputs pins.
That's how RC receivers used to decode PPM.

Tom

[Non-text portions of this message have been removed]

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

______________________________
controlSUITE™ software. Comprehensive. Intuitive. Optimized.
Real-world software for real-time control. Details Here!



(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: Seperate Pulsetrain into individual channel - Tom Becker - Mar 19 7:48:46 2009

> ... the Output capture clock Pin.

It is any I/O pin, assigned in the OutputCapture instruction. If you
connect it to the shift register clock, the data will be placed on each
output pin in succession. you might need to assign a clear or reset, too.

Tom
------------------------------------

______________________________
controlSUITE™ software. Comprehensive. Intuitive. Optimized.
Real-world software for real-time control. Details Here!



(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: Seperate Pulsetrain into individual channel - Tom Becker - Mar 19 8:05:06 2009

> ... the Output capture clock Pin.

Pardon me; my mind is elsewhere. I am thinking of the clock on ShiftOut.
Tom

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

______________________________
controlSUITE™ software. Comprehensive. Intuitive. Optimized.
Real-world software for real-time control. Details Here!



(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: Seperate Pulsetrain into individual channel - Huynh Phuoc Thien - Mar 20 0:40:21 2009

Hope that Ouputcapture and Shiftout use the same clock. I have written a co=
de as follow:=20

Public Sub mani()

const clock As byte =3D10 =A0' connect pin 10 of BX24 to pin 11 of 74HC595=
=20
const latch as byte =3D11 =A0=A0' connect to pin 12 of 74H595
dim pulsetrain (1 to 8)=A0 as unsignedInteger
pulsetrain(1) =3D 1000
pulsetrain(2) =3D 2000
pulsetrain(3) =3D 3000
.....
pulsetrain(8) =3D 4000
do=20

Call putpin (clk, 0)
call putpin (latch,0)
call outputcapture(pulsetrain,8,1) ' connect to pin 14 of 74HC595

Loop

EndSub

I am planning to use oscilloscope to view the output of 74HC595. Hopefully =
I can work, I will tell you as I can reach the result measurement
=20
Pthien

--- On Thu, 3/19/09, Tom Becker wrote:

From: Tom Becker
Subject: Re: [BasicX] Seperate Pulsetrain into individual channel
To: b...@yahoogroups.com
Date: Thursday, March 19, 2009, 5:02 AM

> ... the Output capture clock Pin.

Pardon me; my mind is elsewhere. I am thinking of the clock on ShiftOut.

Tom

=20=20=20=20=20=20
=20=20=20=20=20=20

[Non-text portions of this message have been removed]

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



(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )