Reply by James January 26, 20062006-01-26
"MetalHead" <WanderingMetalHead@DUMPSPAM.yahoo.com> wrote in message
news:huzBf.1711$wk5.999@news02.roc.ny...
> john wrote: > > Hi, > > > > I am having problems with the port B. Its an output port and I am > > writing the whole port. My code is as follows > > > > ORG 2000 > > LDAA $# FF > > STAA $1004 > > > > Now, if I write 00 hex or FF to theport. The port is always floating. > > I tried pull ups and pull downs but no difference. Please advice. > > Thanks > > A couple of questions: > Which 68HC11 variant are you using? > Are you using it in single chip or expanded mode? > > The only HC11 docs I have, show port B as an output only port and don't > show any way to disable the output transistors. up right or is cooked. > > Good Luck, > Bob
Hi John, I have to agree with Bob, we need to know what variation of the HC11 you are using and the mode it's operating in. Also are you sure you really want your program to start at 2000 decimal (Or 7Dh). All the memory maps I've checked don't appear to have anything useable for a programmer at this location. Hope this helps, James
Reply by CBFalconer January 24, 20062006-01-24
john wrote:
> > I do not know how not to top post. please advice. I tried both > syntaxs the result is same.
The following will explain it: http://www.caliburn.nl/topposting.html http://www.netmeister.org/news/learn2quote.html http://www.catb.org/~esr/faqs/smart-questions.html http://www.greenend.org.uk/rjk/2000/06/14/quoting.html http://www.i-hate-computers.demon.co.uk/ http://web.ukonline.co.uk/g.mccaughan/g/remarks/uquote.html Also, include adequate context in your messages, even if using googles broken usenet interface. All articles should stand by themselves. See instructions and reference in my sig below. -- "If you want to post a followup via groups.google.com, don't use the broken "Reply" link at the bottom of the article. Click on "show options" at the top of the article, then click on the "Reply" at the bottom of the article headers." - Keith Thompson More details at: <http://cfaj.freeshell.org/google/>
Reply by MetalHead January 24, 20062006-01-24
john wrote:
> Hi, > > I am having problems with the port B. Its an output port and I am > writing the whole port. My code is as follows > > ORG 2000 > LDAA $# FF > STAA $1004 > > Now, if I write 00 hex or FF to theport. The port is always floating. > I tried pull ups and pull downs but no difference. Please advice. > Thanks
A couple of questions: Which 68HC11 variant are you using? Are you using it in single chip or expanded mode? The only HC11 docs I have, show port B as an output only port and don't show any way to disable the output transistors. Is your port truly floating or is it just not responding to the input register? The docs I have are for an A8, E2 or E9 part. If the port really is floating and the part is powered up and grounded properly, it is possible that the port is cooked. If you are using the HC11 in normal, single chip mode, the MODB pin should be tied to +5v through a resistor and the MODA pin tied to ground. If the MODA pin is not grounded, the data register cannot be written by the data bus, it's stuck as the high order address bus. If you are using an expanded mode with the port replacement chip, I would suspect that the port replacement chip is not set up right or is cooked. Good Luck, Bob
Reply by James Beck January 24, 20062006-01-24
This is top posting.

In article <1138127807.972537.169750@o13g2000cwo.googlegroups.com>, 
conphiloso@hotmail.com says...
> Hi, > > I do not know how not to top post. please advice. I tried both syntaxs > the result is same. >
This is where you should respond. If you need to snip old junk to keep the post manageable that's fine. Anyway, I'm sure your little code snippet is not the entire file you are assembling, or is it? You should have reset vectors defined and the like. Your complete file should be a little more in depth. For example, this assembly routine to alter the CONFIG register : ; THE 'HC11 MUST BE IN ONE OF THE SPECIAL MODES TO PROG. CONFIG ; CHANGES WON'T TAKE UNTIL RESET ; ASSUMES AN HC11Ax WITH AN 8MHZ OSC (2MHZ ECLOCK) ORG $A000 EX31A LDS #$00FF ;set stack ptr LDAA #$00 ;turn off EEPROM protect STAA $1035 ;write it LDAA #$00 ;preset porta STAA $1000 ;write it LDAA #$0F ;set porta STAA $1001 ;write to ddr BSR DLY10 ;delay 10 ms LDAA #$0A ;get desired config value (change if needed) ; 0a = COP,NOEEPROM CMPA $103F ;compare it to the actual value BEQ NOWOK ;if it is OK goto nowok ;else do this LDAB #$16 STAB $103B ;SETUP PPROG REGISTER FOR BYTE ERASE STAA $103F ;DO ANY WRITE TO THE REGISTER INCB STAB $103B ;TURN ON THE PROG VOLTAGE BSR DLY10 ;DELAY 10MS CLR $103B ; TURN OFF THE PROG VOLTAGE LDAB #$02 STAB $103B ;SETUP TO WRITE THE DATA STAA $103F ; NOW WRITE THE ACTUAL DATA INCB STAB $103B ; TURN ON THE PROG VOLTAGE BSR DLY10 ; WAIT AGAIN CLR $103B ; TURN OFF EVERYTHING PROGED LDAA #$08 ; FLIP A PORT BIT STAA $1000 ; I USE THIS BIT TO TOGGLE AN LED BRA PROGED ; WAIT FOR RESET NOWOK LDAA #$04 ;IF CONFIG VALUE OK FLIP DIFFERENT BIT STAA $1000 BRA NOWOK ; WAIT FOREVER DLY10 PSHX ; HARD CODED 10MS DELAY BASED ON ABOVE ASSUMPTIONS LDX #$1A0C DLOOP DEX BNE DLOOP PULX RTS ORG $BFFE RESET FDB $A000
Reply by john January 24, 20062006-01-24
Hi,

I do not know how not to top post. please advice. I tried both syntaxs
the result is same.

John

Reply by karel January 24, 20062006-01-24
"James Beck" <jim@reallykillersystems.com> schreef in bericht 
news:MPG.1e4034b094788da2989c18@news.west.earthlink.net...
> In article <1138125287.812767.71340@g43g2000cwa.googlegroups.com>, > conphiloso@hotmail.com says... > > TOP POST FIXED > > James Beck wrote: >> In article <43d659f0$0$29459$ba620e4c@news.skynet.be>, >> adelcoGENE@zeverSKYNET.BE says... >> > >> > Since you want ALL bits to be outputs, write #$FF to the DDRB. >> > >> > >> > >> No DDRB, it is an output only. >> At least on all of the variants I have on hand. >> Hi, >> >> The port B is an ouput port. why do I need to set its direction ? >> >> Please advice! >> >> >> > I think that's what I said........ > BTW, since it is an output only port it shouldn't be "floating" either.
This "floating" bit confirmed my idea that it was configured as an input
Reply by karel January 24, 20062006-01-24
"john" <conphiloso@hotmail.com> schreef in bericht 
news:1138125287.812767.71340@g43g2000cwa.googlegroups.com...
> Thanks > John > James Beck wrote: >> In article <43d659f0$0$29459$ba620e4c@news.skynet.be>, >> adelcoGENE@zeverSKYNET.BE says... >> > >> > "James Beck" <jim@reallykillersystems.com> schreef in bericht >> > news:MPG.1e400edf364e9b3989c14@news.west.earthlink.net... >> > > In article <1138114456.450664.271660@f14g2000cwb.googlegroups.com>, >> > > conphiloso@hotmail.com says... >> > >> Hi, >> > >> >> > >> I am having problems with the port B. Its an output port and I am >> > >> writing the whole port. My code is as follows >> > >> >> > >> ORG 2000 >> > >> LDAA $# FF >> > > >> > > Try LDAA #$0ff >> > >> > That's one step forward. >> > (did your assembler not splutter at the $#FF?) >> > >> > More important yet: at power up, all ports are configured as inputs. >> > So before they can serve as outputs, you must tell them to >> > become outputs. Do this by writing 1 to the relative bits in the >> > corresponding data direction register. On an 6812 it is called DDRB, >> > suppose it's the same on 6811. >> > Since you want ALL bits to be outputs, write #$FF to the DDRB. >> > >> > >> > >> No DDRB, it is an output only. >> At least on all of the variants I have on hand. > > The port B is an ouput port. why do I need to set its direction ?
That is exactly what James was saying. It is I that was mistaken - not knowing the 6811 I assumed it would behave like the 6812 I do have experience with.
> Please advice!
Do not top post Seriously though, I can only assume the problem is in your syntax (as was already suggested): you wrote $#FF where it should have been #$FF So I repeat my question: did your assembler accept that phrase? What does the assembly listing show? KA
Reply by john January 24, 20062006-01-24
Hi,
any solutions!

John

Reply by James Beck January 24, 20062006-01-24
In article <1138125287.812767.71340@g43g2000cwa.googlegroups.com>, 
conphiloso@hotmail.com says...

TOP POST FIXED

James Beck wrote:
> In article <43d659f0$0$29459$ba620e4c@news.skynet.be>, > adelcoGENE@zeverSKYNET.BE says... > > > > "James Beck" <jim@reallykillersystems.com> schreef in bericht > > news:MPG.1e400edf364e9b3989c14@news.west.earthlink.net... > > > In article <1138114456.450664.271660@f14g2000cwb.googlegroups.com>, > > > conphiloso@hotmail.com says... > > >> Hi, > > >> > > >> I am having problems with the port B. Its an output port and I am > > >> writing the whole port. My code is as follows > > >> > > >> ORG 2000 > > >> LDAA $# FF > > > > > > Try LDAA #$0ff > > > > That's one step forward. > > (did your assembler not splutter at the $#FF?) > > > > More important yet: at power up, all ports are configured as inputs. > > So before they can serve as outputs, you must tell them to > > become outputs. Do this by writing 1 to the relative bits in the > > corresponding data direction register. On an 6812 it is called DDRB, > > suppose it's the same on 6811. > > Since you want ALL bits to be outputs, write #$FF to the DDRB. > > > > > > > No DDRB, it is an output only. > At least on all of the variants I have on hand. > Hi, > > The port B is an ouput port. why do I need to set its direction ? > > Please advice! > > >
I think that's what I said........ BTW, since it is an output only port it shouldn't be "floating" either. JIm
Reply by john January 24, 20062006-01-24
Hi,

The port B is an ouput port. why do I need to set its direction ?

Please advice!

Thanks
John
James Beck wrote:
> In article <43d659f0$0$29459$ba620e4c@news.skynet.be>, > adelcoGENE@zeverSKYNET.BE says... > > > > "James Beck" <jim@reallykillersystems.com> schreef in bericht > > news:MPG.1e400edf364e9b3989c14@news.west.earthlink.net... > > > In article <1138114456.450664.271660@f14g2000cwb.googlegroups.com>, > > > conphiloso@hotmail.com says... > > >> Hi, > > >> > > >> I am having problems with the port B. Its an output port and I am > > >> writing the whole port. My code is as follows > > >> > > >> ORG 2000 > > >> LDAA $# FF > > > > > > Try LDAA #$0ff > > > > That's one step forward. > > (did your assembler not splutter at the $#FF?) > > > > More important yet: at power up, all ports are configured as inputs. > > So before they can serve as outputs, you must tell them to > > become outputs. Do this by writing 1 to the relative bits in the > > corresponding data direction register. On an 6812 it is called DDRB, > > suppose it's the same on 6811. > > Since you want ALL bits to be outputs, write #$FF to the DDRB. > > > > > > > No DDRB, it is an output only. > At least on all of the variants I have on hand.