A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.
Register RCON - wantoniet - Sep 22 10:44:00 2005
Hi Folks,
I need help to understand what is going on... I´m using a PIC18F452 and
suddenly it resets when it´s communicating via SPI.
In such to debug this weird problem, i monitored register RCON
(register that provides the sources of reset). When i power up the
board, the register contains 12D (1100 at LSB nibble), what means that
power-on reset and brown-out occurred. When microcontroller resets
inadvertelly this register constains no more 12D, but 14D (1110 at LSB
nibble), what means power-on reset not occurred. To dive deeper in this
problem i passed to monitor register STKPTR that contains stack pointer
value. In normal power-up conditions this register must constains 0,
and this happens indeed, however when microcontroller resets (weird
problem) this register show up 01, what means that stack-pointer was
increased.
Well, once i´ve enabled overflow/underflow stack reset, if
microcontroller reset due stack pointer, 7th and 6th bit of STKPTR
would change to 1, but this not occur. In truth, what happens is that
stack-pointer is increased.
The worst thing is that i can´t simulate, cause MPLAB SIM does not
provide serial feature simulation.
Does anybody faced with a problem like this? Another point: I´m using
CCS compiler.
I´m grateful for any help!!
Wilson

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: Register RCON - Vasile Surducan - Sep 29 5:52:00 2005
--- In piclist@picl..., "wantoniet" <wantoniet@y...> wrote:
> Hi Folks,
>
> I need help to understand what is going on... I´m using a
PIC18F452 and
> suddenly it resets when it´s communicating via SPI.
The PIC and the SPI device are supplied both from the same voltage
value ? The SPI is using interrupts ?
cheers,
Vasile
> In such to debug this weird problem, i monitored register RCON
> (register that provides the sources of reset). When i power up the
> board, the register contains 12D (1100 at LSB nibble), what means
that
> power-on reset and brown-out occurred. When microcontroller resets
> inadvertelly this register constains no more 12D, but 14D (1110 at
LSB
> nibble), what means power-on reset not occurred. To dive deeper in
this
> problem i passed to monitor register STKPTR that contains stack
pointer
> value. In normal power-up conditions this register must constains
0,
> and this happens indeed, however when microcontroller resets
(weird
> problem) this register show up 01, what means that stack-pointer
was
> increased.
>
> Well, once i´ve enabled overflow/underflow stack reset, if
> microcontroller reset due stack pointer, 7th and 6th bit of STKPTR
> would change to 1, but this not occur. In truth, what happens is
that
> stack-pointer is increased.
>
> The worst thing is that i can´t simulate, cause MPLAB SIM does not
> provide serial feature simulation.
>
> Does anybody faced with a problem like this? Another point: I´m
using
> CCS compiler.
>
> I´m grateful for any help!!
> Wilson

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
UART Code example, and 8 x 8 switch example - Alan Marconett - Sep 30 11:47:00 2005
Hi to the list,
I'm forwarding a message that I received. I had some ideas, but I wonder if
we could get a reply from one of the many knowledgeable members of this
list. It's an interesting application.
As many might have surmised, we are both Amateur Radio Operators. Kinda
like a big brotherhood!
Thanks,
Alan KM6VV
> Hello ALan,
> I've been trying to post a message and contact the moderator for this
> group without success. I'm hoping the moderator is watching emails
> (although I don't know why he's not seeing mine), so if you would post
> a message that I need some help ("w3nj"), I'd appreacite it.
>
> By the way, the message I've been trying to post has to do with
> www.qsl.net/ka2pyj/serialschematic.htm. I'd like to know if there are
> any code examples for a UART and 8 x8 switch that could be used for
> this circuit. If you wouldn't mind posting this message in the short
> term, I'd also appreaciate it (I can read the group responses, just
> can't send)
>
> tnx es 73
>
> Bruce -W3NJ

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: UART Code example, and 8 x 8 switch example - Chad Russel - Sep 30 12:38:00 2005
Sorry. From your schematic and your request, I do not have a clue what
you are doing, or asking for. :-( Am I missing something obvious?
Chad
--- Alan Marconett <KM6VV@KM6V...> wrote:
> Hi to the list,
>
> I'm forwarding a message that I received. I had some ideas, but I
> wonder if
> we could get a reply from one of the many knowledgeable members of
> this
> list. It's an interesting application.
>
> As many might have surmised, we are both Amateur Radio Operators.
> Kinda
> like a big brotherhood!
>
> Thanks,
>
> Alan KM6VV
> > Hello ALan,
> > I've been trying to post a message and contact the moderator for
> this
> > group without success. I'm hoping the moderator is watching emails
> > (although I don't know why he's not seeing mine), so if you would
> post
> > a message that I need some help ("w3nj"), I'd appreacite it.
> >
> > By the way, the message I've been trying to post has to do with
> > www.qsl.net/ka2pyj/serialschematic.htm. I'd like to know if there
> are
> > any code examples for a UART and 8 x8 switch that could be used for
> > this circuit. If you wouldn't mind posting this message in the
> short
> > term, I'd also appreaciate it (I can read the group responses, just
> > can't send)
> >
> > tnx es 73
> >
> > Bruce -W3NJ
My software has no bugs, only undocumented features.

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
RE: UART Code example, and 8 x 8 switch example - Alan Marconett - Sep 30 13:18:00 2005
Hi Chad,
I'm thinking he wants to substitute a PIC (16C7X?), write a software UART if
the PIC doesn't have one, and drive a CMOS cross-point switch of some sort.
Perhaps after he's no longer moderated, he can supply a little more info.
Alan KM6VV
> -----Original Message-----
> From: piclist@picl... [mailto:piclist@picl...] On Behalf
> Of Chad Russel
> Sent: Friday, September 30, 2005 9:39 AM
> To: piclist@picl...
> Subject: Re: [piclist] UART Code example, and 8 x 8 switch example
>
> Sorry. From your schematic and your request, I do not have a clue what
> you are doing, or asking for. :-( Am I missing something obvious?
>
> Chad
>
> --- Alan Marconett <KM6VV@KM6V...> wrote:
>
> > Hi to the list,
> >
> > I'm forwarding a message that I received. I had some ideas, but I
> > wonder if
> > we could get a reply from one of the many knowledgeable members of
> > this
> > list. It's an interesting application.
> >
> > As many might have surmised, we are both Amateur Radio Operators.
> > Kinda
> > like a big brotherhood!
> >
> > Thanks,
> >
> > Alan KM6VV
> >
> >
> > > Hello ALan,
> > > I've been trying to post a message and contact the moderator for
> > this
> > > group without success. I'm hoping the moderator is watching emails
> > > (although I don't know why he's not seeing mine), so if you would
> > post
> > > a message that I need some help ("w3nj"), I'd appreacite it.
> > >
> > > By the way, the message I've been trying to post has to do with
> > > www.qsl.net/ka2pyj/serialschematic.htm. I'd like to know if there
> > are
> > > any code examples for a UART and 8 x8 switch that could be used for
> > > this circuit. If you wouldn't mind posting this message in the
> > short
> > > term, I'd also appreaciate it (I can read the group responses, just
> > > can't send)
> > >
> > > tnx es 73
> > >
> > > Bruce -W3NJ
>

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: UART Code example, and 8 x 8 switch example - Robert Rolf - Sep 30 13:27:00 2005
Chad Russel wrote:
> Sorry. From your schematic and your request, I do not have a clue what
> you are doing, or asking for. :-( Am I missing something obvious?
>
> Chad
Yeah.
We're supposed to be mind readers.
Looking at the schematic, it would appear that he
wants to extend the existing schematic to handle an 8x8
matrix instead of the 5 x 8 shown.
I'd use a pair of 4051's and not bother with data/strobe
or the diodes.
3 bits off the UART for X side 4051, 3 for Y side 4051
and an enable to both 4051s for the 'close button' command.
And just to be idiot proof, you tie the "common" on the 4051's
together. Gives you a 100 ohm switch if the 4051s have 12V
power. Couldn't be simpler.
Looking at the schematic, what sane person reverses
bit order when connecting data busses? (UART to demux).
What a PITA to program.
Robert.
> --- Alan Marconett <KM6VV@KM6V...> wrote:
>>Hi to the list,
>>
>>I'm forwarding a message that I received. I had some ideas, but I
>>wonder if
>>we could get a reply from one of the many knowledgeable members of
>>this
>>list. It's an interesting application.
>>
>>As many might have surmised, we are both Amateur Radio Operators.
>>Kinda
>>like a big brotherhood!
>>
>>Thanks,
>>
>>Alan KM6VV
>>
>>
>>
>>>Hello ALan,
>>>I've been trying to post a message and contact the moderator for
>>
>>this
>>
>>>group without success. I'm hoping the moderator is watching emails
>>>(although I don't know why he's not seeing mine), so if you would
>>
>>post
>>
>>>a message that I need some help ("w3nj"), I'd appreacite it.
>>>
>>>By the way, the message I've been trying to post has to do with
>>>www.qsl.net/ka2pyj/serialschematic.htm. I'd like to know if there
>>
>>are
>>
>>>any code examples for a UART and 8 x8 switch that could be used for
>>>this circuit. If you wouldn't mind posting this message in the
>>
>>short
>>
>>>term, I'd also appreaciate it (I can read the group responses, just
>>>can't send)
>>>
>>>tnx es 73
>>>
>>>Bruce -W3NJ
>>
>
> My software has no bugs, only undocumented features.

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: UART Code example, and 8 x 8 switch example - Chad Russel - Sep 30 14:06:00 2005
Ok. I think I have a handle, you need an 8 X 8 matrix decoder. From
what I saw about this, I think obsolete part, it is an 8 X 8 matrix
decoder. Quite a bit different than an 8 X 8 serial crosspoint switch
I was thinking was needed. There is a company big in this, but I am
not sure of which.
Chad
--- Robert Rolf <robert.rolf@robe...> wrote:
> Chad Russel wrote:
>
> > Sorry. From your schematic and your request, I do not have a clue
> what
> > you are doing, or asking for. :-( Am I missing something obvious?
> >
> > Chad
>
> Yeah.
> We're supposed to be mind readers.
>
> Looking at the schematic, it would appear that he
> wants to extend the existing schematic to handle an 8x8
> matrix instead of the 5 x 8 shown.
>
> I'd use a pair of 4051's and not bother with data/strobe
> or the diodes.
> 3 bits off the UART for X side 4051, 3 for Y side 4051
> and an enable to both 4051s for the 'close button' command.
> And just to be idiot proof, you tie the "common" on the 4051's
> together. Gives you a 100 ohm switch if the 4051s have 12V
> power. Couldn't be simpler.
>
> Looking at the schematic, what sane person reverses
> bit order when connecting data busses? (UART to demux).
> What a PITA to program.
>
> Robert.
>
> >
> > --- Alan Marconett <KM6VV@KM6V...> wrote:
> >
> >
> >>Hi to the list,
> >>
> >>I'm forwarding a message that I received. I had some ideas, but I
> >>wonder if
> >>we could get a reply from one of the many knowledgeable members of
> >>this
> >>list. It's an interesting application.
> >>
> >>As many might have surmised, we are both Amateur Radio Operators.
> >>Kinda
> >>like a big brotherhood!
> >>
> >>Thanks,
> >>
> >>Alan KM6VV
> >>
> >>
> >>
> >>>Hello ALan,
> >>>I've been trying to post a message and contact the moderator for
> >>
> >>this
> >>
> >>>group without success. I'm hoping the moderator is watching emails
> >>>(although I don't know why he's not seeing mine), so if you would
> >>
> >>post
> >>
> >>>a message that I need some help ("w3nj"), I'd appreacite
it.
> >>>
> >>>By the way, the message I've been trying to post has to do with
> >>>www.qsl.net/ka2pyj/serialschematic.htm. I'd like to know if there
> >>
> >>are
> >>
> >>>any code examples for a UART and 8 x8 switch that could be used
> for
> >>>this circuit. If you wouldn't mind posting this message in the
> >>
> >>short
> >>
> >>>term, I'd also appreaciate it (I can read the group responses,
> just
> >>>can't send)
> >>>
> >>>tnx es 73
> >>>
> >>>Bruce -W3NJ
> >>
> >>
> >
> >
> > My software has no bugs, only undocumented features.
My software has no bugs, only undocumented features.

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: Register RCON - wantoniet - Sep 30 14:50:00 2005
--- In piclist@picl..., "Vasile Surducan" <vasile@s...> wrote:
> --- In piclist@picl..., "wantoniet" <wantoniet@y...> wrote:
> > Hi Folks,
> >
> > I need help to understand what is going on... I´m using a
> PIC18F452 and
> > suddenly it resets when it´s communicating via SPI.
>
> The PIC and the SPI device are supplied both from the same voltage
> value ? The SPI is using interrupts ?
>
> cheers,
> Vasile
>
> >
> > In such to debug this weird problem, i monitored register RCON
> > (register that provides the sources of reset). When i power up
the
> > board, the register contains 12D (1100 at LSB nibble), what means
> that
> > power-on reset and brown-out occurred. When microcontroller
resets
> > inadvertelly this register constains no more 12D, but 14D (1110
at
> LSB
> > nibble), what means power-on reset not occurred. To dive deeper
in
> this
> > problem i passed to monitor register STKPTR that contains stack
> pointer
> > value. In normal power-up conditions this register must constains
> 0,
> > and this happens indeed, however when microcontroller resets
> (weird
> > problem) this register show up 01, what means that stack-pointer
> was
> > increased.
> >
> > Well, once i´ve enabled overflow/underflow stack reset, if
> > microcontroller reset due stack pointer, 7th and 6th bit of
STKPTR
> > would change to 1, but this not occur. In truth, what happens is
> that
> > stack-pointer is increased.
> >
> > The worst thing is that i can´t simulate, cause MPLAB SIM does
not
> > provide serial feature simulation.
> >
> > Does anybody faced with a problem like this? Another point: I´m
> using
> > CCS compiler.
> >
> > I´m grateful for any help!!
> > Wilson
Hi Vasile,
Yes, same supply and SPI routine runs inside an external interrupt
INT0 routine.
Thanks
Wilson

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )