did not work and I changed all portb references to input_b() which worked. Well I went back to the getenv statement and it does work. I don't know what I did wrong but something obviously.
With
in appropriate places in the program I get "portb = 0d" displayed so getenv definitely works showing the correct address for portb. I will switch to input_b() and forget bad habits I learned in 2002.
I will implement all the lessons learned here, thanks to all.
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
Posted: Sat Feb 20, 2016 11:04 am
If you also program the 18F parts - you REALLY want to abandon direct I/O register access, because it is different on that chip.
The glory of CCS is that their intrinsic functions like input_b() and output_B()
as well as timer setting , pwm and most other PIC function components , compiles the same code transparently across different parts and even differing families of PICS ..
You were guilty of the same lapses i committed when a newish user - fresh out of assmbler only PIC work. CCS is just so much better
All times are GMT - 6 Hours Goto page Previous1, 2
Page 2 of 2
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum