 mnx
		
			mnx
		
		
		
		
		
		
		
		
	
			08-27-2013 02:13 AM
Hi,
I want to extract register names to a dropdown and their corresponding addresses from .inc file in such a way that when I select a register from dropdown, it has to also show its address in a string indicator.
However, only a part of .inc file consists of register definitions and the rest has bit definition of registers (unwanted). How can I extract this using labview?
Attached is a sample .inc file for PIC18F4620 device.
08-27-2013 04:29 AM
registers are specified in .inc file in the following format:
PORTA EQU H'0F80'
where, PORTA is register name & 0F80 is its address. I want to extract this information for all the registers listed.
 
					
				
		
 pincpanter
		
			pincpanter
		
		
		
		
		
		
		
		
	
			08-27-2013 05:00 AM
Read the file line by line until you find "Register Files" (use for example Search/Split String).
Then, read again splitting each line in its tokens (use Scan String for Tokens).
Keep the first token as name and convert the proper substring of the third token to the address value.
Terminate when line is empty.
 Ranjeet_Singh
		
			Ranjeet_Singh
		
		
		
		
		
		
		
		
	
			08-27-2013 05:26 AM
Use read file VI and later read it using search / split string as suggested before.