Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] how to read a BIT value from a BYTE variable in xc8 compiler ?

Status
Not open for further replies.

anjalimidhuna

Member level 3
Joined
Jan 4, 2014
Messages
62
Helped
2
Reputation
4
Reaction score
2
Trophy points
8
Location
india
Activity points
358
hi,
Is it possible to read a bit value of variable without using operaters like and,or,etc.
For example X0=Byte1.Bit0 like we addres a PORT0.7
 

esp1

Advanced Member level 1
Joined
Sep 4, 2007
Messages
401
Helped
139
Reputation
278
Reaction score
139
Trophy points
1,323
Location
England
Activity points
3,374
hi,
This is Oshonsoft Basic, works correctly.
E

Code:
Dim num1 As Byte
Dim num2 As Word

Dim b As Bit

num1 = 0x0e
num2 = 0x000e

b = num1.0

b = num2.8
 

anjalimidhuna

Member level 3
Joined
Jan 4, 2014
Messages
62
Helped
2
Reputation
4
Reaction score
2
Trophy points
8
Location
india
Activity points
358
thanks esp1 for your reply but i m using xc8 compiler and couldn't find dim there :-(
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top