Is it possible to create microcontroller independent library?? if yes then how? I mean each time we create new project it asks for a controller selection. but what if i do not use controller specific registers and all?? then is it possible to use this lib file
for other controllers??? or is there any other way to do it???
There is a way. It's called 'portable C code'.
Other languages are available - though not nearly so widely supported.
And, although it can be done, it is not always a good idea to do it - think about the vast spectrum of capabilities of all the different microcontrollers available...