Mode switch

Hello
I'm experimenting with accelerometer.
I made 2 tests in which I move a character using.
In one I use a landscape mode (horizontal) and have no scrolling and everything runs ok.
In the other I have portrait mode (vertical) and vertical scrolling, but when my accelerometer reaches high values the mode is changet to landscape. What should that depend on? How can I prevent it?
I'm experimenting with accelerometer.
I made 2 tests in which I move a character using.
In one I use a landscape mode (horizontal) and have no scrolling and everything runs ok.
In the other I have portrait mode (vertical) and vertical scrolling, but when my accelerometer reaches high values the mode is changet to landscape. What should that depend on? How can I prevent it?