Shift Register

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hello,

   

I want to place a delay on my signal path

   

I try to use the Shift Register component [v2.30] : I connect only the reset, clock and shift_out pins.

   

Nothing comes out on shift_out pin : I expected that 8 clocks after the reset this pin will get to high level....

   

Where did I get wrong ?

0 Likes
8 Replies
RaAl_264636
Level 6
Level 6
50 sign-ins 25 sign-ins 10 solutions authored

Hi Harvey,

   

 

   

have you enabled the shift register by calling ShiftReg_Start() ? According to SR datasheet there's also a CLK_EN flag which must be set (don't know if the ShiftReg_Start() function will set this flag).

   

 

   

Regards,

   

 

   

Ralf

0 Likes
Anonymous
Not applicable

Hi,

   

Thank you for your prompt and accurate reply.

   

I tested with ShiftReg_Start(); and it works fine.

   

Even after reading the documentation I have not understood that it was mandatory to " start " this component.

   

Thanks you for your help.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

As a general rule of thumb: Every component has got a required _Start() and a _Stop() function (with very few exceptions) . Has to do with minimizing power requirements. The components with power management features have got additional functions as _Sleep(), _Wakeup() and configurastion save and restore.

   

 

   

Bob

0 Likes
RaAl_264636
Level 6
Level 6
50 sign-ins 25 sign-ins 10 solutions authored

Hi Harvey,

   

 

   

it's a good approach to search the datasheet of used components for the API, especially if a start function is implemented. If yes, it's usually needed to call it to setup the component.

   

 

   

In your case, the registers and FIFOs of the shift register will be configured (I assume that most of that is already done by the customizer), but I assume that the CLK_EN flag is set within the start function.

   

 

   

Glad that I could help 🙂

   

 

   

Regards,

   

 

   

Ralf

0 Likes
Anonymous
Not applicable

Hi,

   

Thank for these informations, I will use the _start() features for my components.

   

Unfortunalty if now my component is "alive" it doesn't work as expected : only the reset pin is active.

   

I tested with ShiftReg_Enable(); hoping it will set CLK_EN flag but with no result. (normal as ShiftReg_Start will call this function)

   

The ouput is always high except during the reset pulse : I thought it will be low after the rest pulse , then stay low during the shift (8 clocks) then coming high....

   

I saw that clk_en is in the ShiftReg_SR_CONTROL register but I don't know how to write in it....

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Writing into any of the configuration registers is not needed for a component's normal function. Only when you want to perform something special that is not covered by the provided APIs you might need to so so.

   

Your problem with the shift register is that the reset input must be synchronus to the clock input (check datasheet). Your reset is quite too short to be "seen" by the 10Hz clock, so I would suggest you to enlonger the reset pulse until it is synced with the shift-register clock.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hi Bob

   

I added a PulseConvert to be sure the reset pulse is long enough: it works

   

Although I read that the reset input is synchronous to the clock input, I did not consider it 

   

Thanks for your help.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You are always welcome, Harvey!

   

 

   

Bob

0 Likes