Count falling (or rising ) edges of the incomming square wave and program your microcontroller to output one pulse every N falling ( or rising ) edges. By doing this you will have the output wave of INPUT/N frequency ..
if i did it your way then i can divide the frequency which
is applied into any pin in any port but what i want
is to divide the frequncy using the MCU's internal
COUNTER meanning to determine the mode and the constant ..... etc
did i made my self clear now
Yes, you did yourself clear ..
But if you seek any co-operation from us you should not sound like an SS-commander form the past ..
In your post there is one word missing : please/help ..