We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi all! i am working on a project where i need to control an external ADC chip with an unusual SPI interface. in other risks (and other compilers) i did this with inline assembly succesfully. With UV2 it seems not to work so well...NOT AT ALL ACTUALLY! I suppose it is my fault, but i decided to create a library file for this purpose, as a driver for the ADC. there is only one simple function to implement , which refreshes the ADC with new value.i prefer to use assembly language for this purpose. i have written the asm code and the ADC.A51 file is ready and assembled succesfully. now i need some help on how to turn this into a library...actually i need a detailed description cause i seem to have trouble with basics.i use the output options to tell UV2 to turn my file into a lib file , and so it does.but i guess i need some init code to include in my asm file and a header file. so questions: 1.what else do i need to include/declare in my asm file so that the file is ready to be used for library? 2. how to create a header file? ............IN OTHER WORDS I NEED A STEP BY STEP TUTORIAL on how to create a lib (from my asm subroutine) FROM SCRATCH! thanx in advance Alex
2) you can't - SFRs are absolute addresses and used at COMPILE time. Actually, you can. It's just a little tricky and isn't recommended for novices. http://www.keil.com/support/docs/2413.htm Jon