Dangerous Prototypes

Other projects => Past projects => Web platform => Topic started by: cstrutton on December 05, 2010, 11:30:19 am

Title: Microchip TCP/IP 5.31 and RTCC coexisting?
Post by: cstrutton on December 05, 2010, 11:30:19 am
I have had my web platform for about a week now and am climbing the pic learning curve.  I want to use the platform for an industrial process monitoring solution.  I want to use the Microchip stack due to the SNMP stuff.  I want to use the RTCC to provide date stamps for the events it will forward to an http server (connected to a database).

I believe I am correct in assuming that the RTCC uses timer1 and will conflict with tick.c in the microchip stack.  I am fairly certain it can be moved to another timer.  Has anyone converted tick.c to run on another timer?  If no one has I will be working on this week.  If anyone can offer any help I would appreciate it.

Thanks in advance
Chris
Title: Re: Microchip TCP/IP 5.31 and RTCC coexisting?
Post by: ian on December 06, 2010, 08:34:38 am
Hey Chris,

Let me know if you run into any problem, I'm happy to help with the setup code.

Here's the RTCC reference manual:
http://ww1.microchip.com/downloads/en/D ... 70301B.pdf (http://ww1.microchip.com/downloads/en/DeviceDoc/70301B.pdf)

I thumbed through it really quick. It looks like the RTCC module has its own counter and doesn't use timer 1.
Title: Re: Microchip TCP/IP 5.31 and RTCC coexisting?
Post by: cstrutton on December 06, 2010, 10:26:43 am
Now that I re-read a bunch of stuff you may be right. 

I read this: (from DS70292D-page 187)

Code: [Select]
The unique features of Timer1 allow it to be used for
Real-Time Clock (RTC) applications. A block diagram
of Timer1 is shown in Figure 12-1.
and assumed the RTCC module used timer1.  I will look closer once I get some more sleep.

Chris
Title: Re: Microchip TCP/IP 5.31 and RTCC coexisting?
Post by: ian on December 06, 2010, 10:44:16 am
Probably timer 1 can also be used for a RTCC (as it is in most PICs), but it looks like the RTCC module is separate. It has a nice PPS assignable 1hz output I noticed :)

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.00912047160session_write_close ( )...(null):0
20.00942178736ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.00942179512Database_MySQL->query( ).../DatabaseHandler.php:119
40.05532318232Database_MySQL->error( ).../Db-mysql.class.php:273