PORTB is already define but leads you to Register addr 6... wich is unimplemented on this PIC
PORTA is assign to register addr 5, wich is GPIO
in the above, if you replace GPIO by PORTA, it will work.
Not a good practice but...
PORTB is already define but leads you to Register addr 6... wich is unimplemented on this PIC
PORTA is assign to register addr 5, wich is GPIO
in the above, if you replace GPIO by PORTA, it will work.
Not a good practice but...
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hmm, never realized PORTA and B were in there.
That's odd about PORTB pointing to an unimplemented register. It keeps the compiler from finding problems like what Gary had.
12F675 How do I address thee, let me count the ways.<pre>PORT TRIS<br>-------------<br>GPIO TRISIO<br>PORTA TRISA<br>PORTL TRISL<br>PORTH TRISH</pre>or you can use PIN numbers...<pre>HIGH 5 ; will set GPIO.5 to OUTPUT HIGH<br>or <br>TOGGLE 5</pre>Although a bit strange...
<pre>TOGGLE 13 ; will also toggle GPIO.5</pre>
OK, so that's only 6, who's got number 7 ??
DT
But... for #7, if there's .... euhhhPORT TRIS
-------------
GPIO TRISIO
PORTA TRISA ' errr... PORTB?
PORTL TRISL
PORTH TRISH![]()
Last edited by mister_e; - 20th November 2006 at 02:43.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
LMAO!! NEVER MIND i contradict myself... and i will leave it like THAT
Work and everything assign to 5Code:@GPIO_5=ADCS1 GPIO_5 con ext Toggle GPIO_5
So i guess we could talk more than 7... for what it worth
@GPIO_5=RAM_START-15
GPIO_5 con ext
and so on
Last edited by mister_e; - 20th November 2006 at 03:18.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
That's what I'm talking about!
Functioning Brain Cells.
@GPIO_5=ADCS1
But really, it's just a GPIO_5 CON 5. So I'm not going to give you #7 on it.
You're so close.
When I first looked, I thought you had it. But after a second glance, the buzzer went off.
<script type="text/javascript" src="http://www.darreltaylor.com/files/AudioDo2.js"></script><script>WriteSound("Thinking","http://www.darreltaylor.com/files/jeopardy.wav")</script>
<table><tr><td width=150 onMouseOver="PlaySound('Thinking')">This Might Help</td><td>(except for dwayne)</td></tr></table>
DT
Nice tune, O.K let's try something else...
Something around ...
Code:asm PORT1=ADCS1 PORT2=GPIO PORT3=TRISIO-0x80 endasm PORT1 VAR BYTE EXT PORT2 VAR BYTE EXT PORT3 VAR BYTE EXT Toggle PORT1.5 Toggle PORT2.5 Toggle PORT3.5![]()
Last edited by mister_e; - 20th November 2006 at 04:37.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
<embed NAME="RimShotSound" SRC="http://www.darreltaylor.com/files/rimshot.wav" AUTOSTART="true" WIDTH="0" HEIGHT="0">
We have a Winner!
But I liked the way you had it at first, better.Ok, so let's see what you have won ...... what have I got here ....Code:@GP=5 GP VAR BYTE EXT TOGGLE GP.5
Congratulations!, you've won my respect as a programmer.
Oh, wait a minute, you already had that.
I need to get a sponser, give away some cool stuff :)
<br>
DT
Bookmarks