Maker Pro
Maker Pro

PIC Basic pro

S

ScadaEng

I have not done much programing in PBP, I mostly have used assembly. I'm
trying to knock out a quick program, but one detail is hanging me up. I'm
reading a 24C512 EEPROM 8 bytes at a time. I created a word (16bit) variable
to hold the memory address.

Problem is when I reach $19F8 the next address should be $0A00, but I get
$0000! The low byte works right, then I get to $1B00 and everthing is good
until I get to $29F8 and the next address is again $0000! The $0000
addresses are not really $0000, I know this from the data. Every time the
high byte reaches $0A it displays $00! I wrote a simple routine to just
count from $0000 to $FFF8. It reacts the same! I have PBP ver 2.30, is this
a problem with PBP?

My code...

temp:
memadd = $0000
Hserout [b1, b0 ]
GOTO again
again:
memadd = memadd + $0008
if memadd = $FFF8 THEN
GOTO start
ELSE
Hserout [b1, b0]
ENDIF
GOTO again
 
D

Don McKenzie

ScadaEng said:
I have not done much programing in PBP, I mostly have used assembly. I'm
trying to knock out a quick program, but one detail is hanging me up. I'm
reading a 24C512 EEPROM 8 bytes at a time. I created a word (16bit) variable
to hold the memory address.

There is a whole forum dedicated to answering such questions. I strongly
suggest you try there:
http://www.picbasic.co.uk/forum/index.php

Cheers Don...


--
Don McKenzie

Site Map: http://www.dontronics.com/sitemap
E-Mail Contact Page: http://www.dontronics.com/email
Web Camera Page: http://www.dontronics.com/webcam
No More Damn Spam: http://www.dontronics.com/spam

Breakout, Prototype, Development, & Robotics Boards:
http://www.dontronics-shop.com/sparkfun-electronics.html

Coupon Specials:
http://www.dontronics-shop.com/coupon-specials.html
 
M

Martin Riddle

ScadaEng said:
I have not done much programing in PBP, I mostly have used assembly.
I'm trying to knock out a quick program, but one detail is hanging me
up. I'm reading a 24C512 EEPROM 8 bytes at a time. I created a word
(16bit) variable to hold the memory address.

Problem is when I reach $19F8 the next address should be $0A00, but I
get $0000! The low byte works right, then I get to $1B00 and everthing
is good until I get to $29F8 and the next address is again $0000! The
$0000 addresses are not really $0000, I know this from the data. Every
time the high byte reaches $0A it displays $00! I wrote a simple
routine to just count from $0000 to $FFF8. It reacts the same! I have
PBP ver 2.30, is this a problem with PBP?

My code...

temp:
memadd = $0000
Hserout [b1, b0 ]
GOTO again
again:
memadd = memadd + $0008
if memadd = $FFF8 THEN
GOTO start
ELSE
Hserout [b1, b0]
ENDIF
GOTO again
Compiler bug? Try making $0008 a constant and add the constant.

Cheers
 
S

ScadaEng

Hi ScadaEng,

I've actually used this chip and Picbasic in a datalogging
application. If you can't solve your problem, please let me know and
I'll see if I can help.

I just wanted to say: You're moving away from assembly (almost
certainly a good decision) to... Picbasic Pro?

I agree with your evalulation of PBP. I never used it before this project,
and expect I won't bother with it again. A team member bought it, he did not
want to learn assembly, or any other language for programing PIC.

Thanks to all who responded!
 
Top