I suggest you start by understanding the sort of signals that you need to drive a unipolar stepper motor. A good place to start is 'Jones on Stepping Motors', and specifically the section on unipolar stepper motors.
From that you can see there are several different signal sequences. I'd suggest you start with the simplest single step sequence, i.e.
Winding 1a 1000100010001000100010001
Winding 1b 0010001000100010001000100
Winding 2a 0100010001000100010001000
Winding 2b 0001000100010001000100010
If you draw graphs of those signals, you will see that there are four signals, and each signal is on for a quarter of the time. Ordinary timers in, for example, ATmega328 aren't capable of generating this sequence in hardware.
I've generated the four-phase signals from ATmega timers using interrupt service routines (ISRs). It's an interesting exercise.
The datasheet describes the timers, and the prescaler hardware, which sets the base counting rate, in four chapters (19 to 22). They are reasonably understandable if you have read this sort of stuff before; but if this is all new to you, it may be better to find an Arduino library that sets them up in a helpful way.
(I looked for one about 8 years ago, and didn't find anything I liked, so I evolved my own, rather quirky library, but you may find something that fits your needs using a web search engine.)
So you have a few straightforward options:
- use an MCU with timers designed for driving four phase signals
- carefully design your software so that it's main loop is fast enough
to accurately generate the four signals
- use interrupt service routines, driven by timers, to generate the
signals
- use a stepper motor driver module or chip
There are several Arduino stepper libraries which work on the basis that your main loop is written so that it calls the library often enough to drive the signals, option 3, for example the Arduino AccelStepper library.