It depends. First we need to know what kind of security system it is (Hands Free Security Module - HFSM or Turn Signal Security Module - TSSM). Next we need to know if you have the security fob available (TSSM will have a rubber button on it, HFSM will be solid plastic).
It's worth noting that you CANNOT reset the code without the fob, no matter which security system it is. If you do not have the fob only an authorized H-D dealership will have the appropriate hardware and software to assign new fobs (which you must pay for) and unlock your security system.
To reset the code with a TSSM equipped bike, you will:
1) Set your kill switch to off
2) Quickly turn the ignition switch on, off, on, off, on
3) Immediately press and let go of the left turn signal switch twice (press, let go, press, let go)
4) Press and let go of your fob button twice (press fairly hard, it's designed to resist being pressed by keys and whatnot in your pocket)
5) Current PIN number will be displayed on odometer
6) Change the PIN by pressing the left signal until the desired number is reached
7) Press the fob button twice to cycle to the next number and repeat step 7
8) Press and let go the right signal and turn ignition off when 5 digit PIN is satisfactory
NOTE: Steps 2 through 4 must be completed in quick succession of each other.
Now you can have the bike armed, and disarm with the PIN (example PIN will be 25522 in the following steps):
1) Ignition switch to Accessories
2) Immediately press both turn signals at the same time (red key light on you speedometer will flash rapidly if done right)
3) Press and let go the left signal 2 times
4) Press and let go the right signal once
5) Press and let go the left signal 5 times
6) Press and let go the right signal once
7) Repeat for each of the last three numbers of the PIN (left 5 times, right once, left 2 times, right once, left 2 times, right once)
8) Red key on speedo will stop blinking if done right (security has been disarmed)
NOTE: Steps 2 through 7 must be completed in quick succession of each other.
To reset the code with a HFSM equipped bike, you will:
1) Have your key fob near the bike
2) Set your kill switch to off
3) Quickly turn the ignition switch on, off, on, off, on
4) Immediately press and let go of the left turn signal switch twice (press, let go, press, let go)
5) Press and let go the right signal once
6) Current PIN number will be displayed on odometer
7) Change the PIN by pressing the left signal until the desired number is reached
8) Press the right signal to cycle to the next number and repeat step 7
9) Turn ignition off when 5 digit PIN is satisfactory
NOTE: Steps 3 through 5 must be completed in quick succession of each other.
Now you can have the bike armed, and disarm with the PIN (example PIN will be 25522 in the following steps):
1) Ignition switch to on
2) Immediately press both turn signals at the same time (red key light on you speedometer will flash rapidly if done right)
3) Press and let go the left signal 2 times
4) Press and let go the right signal once
5) Press and let go the left signal 5 times
6) Press and let go the right signal once
7) Repeat for each of the last three numbers of the PIN (left 5 times, right once, left 2 times, right once, left 2 times, right once)
8) Red key on speedo will stop blinking if done right (security has been disarmed)
NOTE: Steps 2 through 7 must be completed in quick succession of each other.