EmbeddedRelated.com
Forums

UART setup for 801C188EB/80186

Started by srao October 14, 2015
On 2015-10-20 Stef wrote in comp.arch.embedded:

> As Rick already said,
Sorry, not Rick but David. Stupid missing attributions from embeddedrelated. -- Stef (remove caps, dashes and .invalid from e-mail address to reply by mail) And then there was the lawyer that stepped in cow manure and thought he was melting...
>On 2015-10-20 Stef wrote in comp.arch.embedded: > >> As Rick already said, > >Sorry, not Rick but David. > >Stupid missing attributions from embeddedrelated. > >-- >Stef (remove caps, dashes and .invalid from e-mail address to reply
by
>mail) > >And then there was the lawyer that stepped in cow manure and thought >he was melting...
TO EVERYONE WHO DIDN'T UNDERSTAND THE QUESTION: I am sorry its difficult for you to get the thing. I guess we dont share the same language. I don't find any point responding back to your comments. TO EVERYONE WHO HELPED(understood the question): Thank you so much for your inputs. With your help I was able to get to the first step.. The watchdog. I think now i can get the UART working too. Thanks a ton. --------------------------------------- Posted through http://www.EmbeddedRelated.com
On 21.10.15 01:37, Stef wrote:

--- clip clip ---

> I do know some PICs (ouch, long time ago), but have never heard of IAR's. > > How do you expect to clear a bit in the registers with the above code? > Why do you need to repeat this 2000 times? > If you wanted to do this on a PIC, how would you do it? > > IIRC on a PIC you always had to load stuff into the W register before > you could do anything...
The OP seems to mix up processors and compilers. IAR is a Swedish companu producing compilers. Their compiler was once upon time the most popular for 8051's. -- -TV
On 21/10/15 08:15, Tauno Voipio wrote:
> On 21.10.15 01:37, Stef wrote: > > --- clip clip --- > >> I do know some PICs (ouch, long time ago), but have never heard of IAR's. >> >> How do you expect to clear a bit in the registers with the above code? >> Why do you need to repeat this 2000 times? >> If you wanted to do this on a PIC, how would you do it? >> >> IIRC on a PIC you always had to load stuff into the W register before >> you could do anything... > > > The OP seems to mix up processors and compilers. IAR is a Swedish > companu producing compilers. Their compiler was once upon time the > most popular for 8051's. >
I didn't know that IAR was ever the most popular choice for 8051's - I thought that was always Keil, with IAR being the alternative option (and SDCC for those that prefer open source tools). So that's an interesting bit of history. One of the key strengths of IAR is that they have compilers for a range of small micros, so the are popular for companies looking for consistency over several different small devices. They also work closely with manufacturers, and have often been the first or only choice at the beginning - such as for Atmel AVR or TI MSP430. AFAIK, IAR never made a PIC compiler.
>On 21.10.15 01:37, Stef wrote: > >--- clip clip --- > >> I do know some PICs (ouch, long time ago), but have never heard of
IAR's.
>> >> How do you expect to clear a bit in the registers with the above code? >> Why do you need to repeat this 2000 times? >> If you wanted to do this on a PIC, how would you do it? >> >> IIRC on a PIC you always had to load stuff into the W register before >> you could do anything... > > >The OP seems to mix up processors and compilers. IAR is a Swedish >companu producing compilers. Their compiler was once upon time the >most popular for 8051's. > >-- > >-TV
Hello all. I got the UART working. Thanks for your help. Seems like the watchdog reset was not allowing the UART to function correctly. Thanks all for all the suggestions and comments. --------------------------------------- Posted through http://www.EmbeddedRelated.com
On 10/19/2015 2:44 PM, srao wrote:
>> On 10/17/2015 7:42 AM, Simon Clubley wrote: >>> On 2015-10-17, rickman <gnuarm@gmail.com> wrote: >>>> On 10/16/2015 7:33 PM, srao wrote: >>>>>> Did something like this:- >>>>>> >>>>>> while(1) >>>>>> { >>>>>> >>>>>> for (N loops) //togggle watchdog >>>>>> { >>>>>> //port1 clear bits >>>>>> Set bit on watchdog PIN >>>>>> outport(0x00xx,a); >>>>>> } >>>>>> >>>>>> for (N loops) >>>>>> { >>>>>> //port1 clear bits >>>>>> //Clear bit on watchdog PIN >>>>>> outport(0x00xx,a); >>>>>> } >>>>>> --------------------------------------- >>>>> not sure if I am doing something wrong here. the above code does not >>>>> toggle the Port pin. is there a better way to solve this? >>>> >>>> Where do you change the value written to the port? You don't even > show >>>> where you set the value of 'a' initially. >>>> >>> >>> The OP _really_ needs to show us _actual_ code not the above pseudo > code. >>> >>> Also, the above sequence "feels" really wrong to me. Why is the port >>> pin being set N times and then cleared N times ? >>> >>> With a watchdog you are supposed to send a specific sequence _once_ >>> every time you decide to report that you are still alive and not > stuck. >> >> I'm guessing this is test code to get the durn thing to work without >> resetting. I get that. But he needs to show his code. >> >> -- >> >> Rick > > Hi Rick, > > I will post the complete code soon. As far as i read the data sheet, the > watchdog (hardware) is connected to one of the ooutput pins and I am just > trying to continously write 0 or 1 to this port to not allow it to kick > the watchdog timer and reset the pin. I did not find a mention of a > specific sequence to be set to stop the watchdog from kicking. Will post > source code soon.
I can't say I understand much of this. Usually the watchdog is not active until activated somehow. Then you write alternating 1 and 0 to the pin to swing it which resets the watchdog timer so it does *not* reset the CPU. Also, all the CPU watchdogs I have seen are just mapped to I/O addresses that control it, not external pins. Is this watchdog a separate chip? Is this not what you are picturing or do *I* not understand how your watchdog works? -- Rick