Hexadecimal number to a hardware register

Hello:

can i please know how to write a hexadecimal number to a hardware register like 1846h, 1946h, 1A46h and 1b46h to hardware register of ADC and read the ADC channel values.

Regards, MALA

Attached vissim diagram. i

Attached vissim diagram. i should be able to read 0.5 if voltage level is 1.65V and i read zero. why is it so. in ADC config block ADC triggering is through software, but hexadecimal number i am writing is for Timer2 triggering ADC. i want to use 2 differnt ADC Configurations. hence i am trying this. at firstpass i want Trigger ADC through Timer2 and then through ePWM's. can you give me solution for this.

The problem is that the

The problem is that the ADCSOCnCTL reg is EALLOW protected. You must issue an EALLOW instruction before writing to protected regs, and follow it with an EDIS instruction to re-enable protection. VisSim executes signal consumers in top down order so you put an externFunction block that invokes EALLOW at the top, and another externFunction block that invokes EDIS at the bottom. See attached ADCnew2.vsm

VisSim supports C

VisSim supports C expressions, so you can use C notation; 0xdddd. See this post on hex number entry. To read or write a hardware register, use the externRead or externWrite* block. In the block select Hardware Register and use the register name as it appears in the TI reference guide.

Can I know how to write

Can I know how to write hexadecimal number to a hardware register and read the same. For channel 1, CHSEL=1h, ACQPS=06h, TRIGSEL=09h hexadecimal number =1846h For channel 5, CHSEL=5h, ACQPS=06h, TRIGSEL=09h hexadecimal number =1946h For channel 9, CHSEL=9h, ACQPS=06h, TRIGSEL=09h hexadecimal number =1A46h For channel 13, CHSEL=Dh, ACQPS=06h, TRIGSEL=09h hexadecimal number =1B46h Extern write and read block can be configured to hardware register but how do I write a hex number. I did not find any block. Please guide me on this.