NOP = 1uS @ 4MHz

Set pin High, add 500 NOP statements, Set pin Low, add 500 NOP Statements... repeat... suppose that's one way of outputting 1KHz...

Do a forum SEARCH for Morse Code... I remember doing an example some time in pre-history...

Ah... here it is...

http://www.picbasic.co.uk/forum/show...31031#poststop