473,399 Members | 2,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Reading a register bit

Hi All,

I am newbie to this forum.

My Question is:

I am using a 16 bit register in FPGA code.The address of that register is 0x77200000 and i want to read the third register of that 16 bit register.

How it is possible?

Thanks for your support,

Regards,
ravi
Mar 25 '08 #1
1 2308
Banfa
9,065 Expert Mod 8TB
I am using a 16 bit register in FPGA code.The address of that register is 0x77200000 and i want to read the third register of that 16 bit register.
Do you mean you want to read the 3rd bit?

You can read the full 16bit register into a variable

Expand|Select|Wrap|Line Numbers
  1.    unsigned short reg = *(unsigned short *)0x77200000;
  2.  
Then use the bitwise operators ( | & ^ ~ << >> ) to isolate the third bit.
Mar 26 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: G Kannan | last post by:
Hey all! I have written a perl script to retrieve information from a HTML Form and insert the data into an Oracle database table. I am gettting the the following error message: "Use of...
18
by: shakeel-ur-rehman | last post by:
I am wrtiting programm in C++ to read/take complete image of the partiton. can any one let me know the internet resources and web sites having tutorials relating to this and tell any sequence ...
1
by: Chris Online | last post by:
Hi all, At the moment I'm using a Altera MAX and MAX+plus2 graphical design software. I'm using the following parts inside the altera: Octal flipflop 74HC273 AddressDecoder 74HC154 Octal Buffer...
1
by: Randell D. | last post by:
Folks, Can someone give me some pointers on how I can read one or more arguements from a url, using js? Why? I'm working on a LAMP based project and when a user successfully registers, the...
3
by: roaher | last post by:
hi I have some trouble reading this macro: #define SMC_inl(r) (*((volatile dword *)(SMC_BASE_ADDRESS+(r)))) also consider that SMC_BASE_ADDRESS is address base of I/O mapped peripherial...
0
by: rs | last post by:
Hi guys, I am trying to read from a USB keyboard using vb.net and HID classes. the USB keyboard is not my primary keyboard. I have a ps2 keyboard connected and is detected in device manager as...
2
by: rs | last post by:
Hi guys, I am trying to read from a USB keyboard using vb.net and HID classes. the USB keyboard is not my primary keyboard. I have a ps2 keyboard connected and is detected in device manager as...
2
by: Robert Scheer | last post by:
Hi. I need to write a service that writes to a database the time of the logon and logoff of the users. Our users logs on Active Directory and some can also log as local administrators. The...
19
by: Hapa | last post by:
Does only reading (never writing) of a variable need thread synchronisation? Thanks for help? PS. Anybody knows a Visual C++ news group?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.