How to store 20 bytes of data (the input to the microcontroller is through usart port)temprorailly using a 8 bit microcontroller to prevent the data from being over written
Easy. You write a simulator so the AVR processor can run 8051 programs written using Keil development tools.
Then you emulate a 8051 with IAP support and store the 20 bytes in flash.
respected sir ,can you pls ellaborate
Don't you find it rater strange to visit a Keil forum and ask a question about Atmel AVR processors when Keil doesn't support the AVR architecture?
And why did you decide to select the C166 architecture? It has nothing in common with AVR.
You haven't even given enough information about the problem and selected processor... How about locating an AVR-specific forum and there give enough information?