store information PORTD

Hello

i want to write a program with the portd

the conditions are :

if first portd=00000001
after this condition
if first portd=00000010
after this condition
if first portd=00000011
after this condition
if first portd=00000100

only and if only these conditions in this order are ok
then put B0 at 1

thanks

I know what portS is but have no idea what you mean by first portd.

Are you saying that you want the specific sequence of values 1,2,3,4 to trigger something? Is so, consider a finite state machine.

What does then put B0 at 1 mean?

How does this relate to storage? Store in eeprom, scared sdcard, fram, ... ?

Hello
sorry for my English

yes, i you want the specific sequence of values 1,2,3,4 to trigger something.

thanks

What is the source of your input? Buttons? Some device or IC?

What needs to happen when the sequence is e.g. 1, 2, 1, 3, 4? Is that valid or do you want to start from the beginning again.

You haven't answered the two other questions.