PIC24FJ1024GB610

tinchogleria wrote on Wednesday, July 05, 2017:

Hi! I’m trying to compile freeRTOS demo for the PIC24FJ1024GB610 and the output when I build says:
lcd.c: In function ‘prvLCDGotoRow’:
lcd.c:148:3: error: ‘PMADDR’ undeclared (first use in this function)
And the same for other symbols in the same file lcd.c.
Any idea of what could I try to solve this issue?
Thanks in advance.

rtel wrote on Wednesday, July 05, 2017:

Sounds like the constants used in the Microchip libraries have been
renamed. PMADDR is, I think the address of a register. What are the
registers called in the libraries the latest Microchip tools come with?

tlafleur wrote on Thursday, July 06, 2017:

PMADDR is used on some PIc24/Pic33 as part of an optional peripheral
“Parallel Master Port” and is not available on all devices… should be
easy to make the code change to drive the LCD…

Read the data sheet!

See AN1210 from Microchip on using the PMP device…

On Wed, Jul 5, 2017 at 1:41 PM Real Time Engineers ltd. rtel@users.sf.net
wrote:

Sounds like the constants used in the Microchip libraries have been
renamed. PMADDR is, I think the address of a register. What are the
registers called in the libraries the latest Microchip tools come with?

PIC24FJ1024GB610
https://sourceforge.net/p/freertos/discussion/382005/thread/74d73758/?limit=25#05b6/fc05

Sent from sourceforge.net because you indicated interest in
SourceForge.net: Log In to SourceForge.net

To unsubscribe from further messages, please visit
SourceForge.net: Log In to SourceForge.net

~~ _/) _/) _/) ``` _/) ~~

Tom Lafleur

tlafleur wrote on Thursday, July 06, 2017:

Looks like the part your using has as an Enhanced Parallel Master/Slave
Port, so you will need to understand the difference between the two
devices… again, read the data sheet for the part used in the FreeRTOS
demo and the data sheet for the part your using to understand the
difference …

On Thu, Jul 6, 2017 at 5:22 AM Tom Lafleur xxxx@xxxx wrote:

PMADDR is used on some PIc24/Pic33 as part of an optional peripheral
“Parallel Master Port” and is not available on all devices… should be
easy to make the code change to drive the LCD…

Read the data sheet!

See AN1210 from Microchip on using the PMP device…

On Wed, Jul 5, 2017 at 1:41 PM Real Time Engineers ltd. xxxx@xxxx
wrote:

Sounds like the constants used in the Microchip libraries have been
renamed. PMADDR is, I think the address of a register. What are the
registers called in the libraries the latest Microchip tools come with?

PIC24FJ1024GB610
https://sourceforge.net/p/freertos/discussion/382005/thread/74d73758/?limit=25#05b6/fc05

Sent from sourceforge.net because you indicated interest in
SourceForge.net: Log In to SourceForge.net

To unsubscribe from further messages, please visit
SourceForge.net: Log In to SourceForge.net

~~ _/) _/) _/) ``` _/) ~~

Tom Lafleur

~~ _/) _/) _/) ``` _/) ~~

Tom Lafleur

tinchogleria wrote on Thursday, July 06, 2017:

I thank you both for your prompt response. Where can I find information about the supposed LCD used by FreeRTOS in this example? I am trying to adapt the lcd.c and lcd.h files of the demo for the Explorer16 / 32 board, but I am missing information about the LCD used in the demo for freeRTOS. I guess this example has been written for an earlier version of the Explorer16 / 32 board. The mia is DM240001-3, and the LCD it has is TSB1G7000-E.
Thanks again.

tlafleur wrote on Thursday, July 06, 2017:

It’s a standard LCD display, look at the source code in microchip sample
for the explorer 16 board. It’s NOT a FreeRTOS supported file.

On Thu, Jul 6, 2017 at 1:51 PM Martin tinchogleria@users.sf.net wrote:

I thank you both for your prompt response. Where can I find information
about the supposed LCD used by FreeRTOS in this example? I am trying to
adapt the lcd.c and lcd.h files of the demo for the Explorer16 / 32 board,
but I am missing information about the LCD used in the demo for freeRTOS. I
guess this example has been written for an earlier version of the
Explorer16 / 32 board. The mia is DM240001-3, and the LCD it has is
TSB1G7000-E.
Thanks again.

PIC24FJ1024GB610
https://sourceforge.net/p/freertos/discussion/382005/thread/74d73758/?limit=25#7552

Sent from sourceforge.net because you indicated interest in
SourceForge.net: Log In to SourceForge.net

To unsubscribe from further messages, please visit
SourceForge.net: Log In to SourceForge.net

~~ _/) _/) _/) ``` _/) ~~

Tom Lafleur

tlafleur wrote on Thursday, July 06, 2017:

data sheet…

~~ _/) _/) _/) ``` _/) ~~

Tom Lafleur

On Thu, Jul 6, 2017 at 2:03 PM, lafleur tlafleur@users.sf.net wrote:

It’s a standard LCD display, look at the source code in microchip sample
for the explorer 16 board. It’s NOT a FreeRTOS supported file.

On Thu, Jul 6, 2017 at 1:51 PM Martin tinchogleria@users.sf.net wrote:

I thank you both for your prompt response. Where can I find information
about the supposed LCD used by FreeRTOS in this example? I am trying to
adapt the lcd.c and lcd.h files of the demo for the Explorer16 / 32 board,
but I am missing information about the LCD used in the demo for freeRTOS. I
guess this example has been written for an earlier version of the
Explorer16 / 32 board. The mia is DM240001-3, and the LCD it has is
TSB1G7000-E.
Thanks again.

PIC24FJ1024GB610
SourceForge.net: Log In to SourceForge.net
thread/74d73758/?limit=25#7552

Sent from sourceforge.net because you indicated interest in
SourceForge.net: Log In to SourceForge.net

To unsubscribe from further messages, please visit
SourceForge.net: Log In to SourceForge.net

~~ */) */) */) ``` */) ~~

Tom Lafleur

PIC24FJ1024GB610
https://sourceforge.net/p/freertos/discussion/382005/thread/74d73758/?limit=25#7552/9169

Sent from sourceforge.net because you indicated interest in
SourceForge.net: Log In to SourceForge.net

To unsubscribe from further messages, please visit
SourceForge.net: Log In to SourceForge.net

tlafleur wrote on Thursday, July 06, 2017:

controller data sheet…’

Novatek NT7603 Controller Datasheet - Crystalfontz
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0ahUKEwiMlv3n0PXUAhVW02MKHYrLDGEQFggpMAA&url=https%3A%2F%2Fwww.crystalfontz.com%2Fcontrollers%2FNovatek%2FNT7603%2F392&usg=AFQjCNGnKHYJ6omi-jJVIjbON2C0Gvwf-Q
https://www.crystalfontz.com/controllers/Novatek/NT7603/392

~~ _/) _/) _/) ``` _/) ~~

Tom Lafleur

On Thu, Jul 6, 2017 at 2:43 PM, lafleur tlafleur@users.sf.net wrote:

data sheet…

http://ww1.microchip.com/downloads/en/DeviceDoc/TSB1G7000-Ev1.0.pdf

~~ */) */) */) ``` */) ~~

Tom Lafleur

On Thu, Jul 6, 2017 at 2:03 PM, lafleur tlafleur@users.sf.net wrote:

It’s a standard LCD display, look at the source code in microchip sample
for the explorer 16 board. It’s NOT a FreeRTOS supported file.

On Thu, Jul 6, 2017 at 1:51 PM Martin tinchogleria@users.sf.net wrote:

I thank you both for your prompt response. Where can I find information
about the supposed LCD used by FreeRTOS in this example? I am trying to
adapt the lcd.c and lcd.h files of the demo for the Explorer16 / 32 board,
but I am missing information about the LCD used in the demo for freeRTOS. I
guess this example has been written for an earlier version of the
Explorer16 / 32 board. The mia is DM240001-3, and the LCD it has is
TSB1G7000-E.
Thanks again.

PIC24FJ1024GB610
SourceForge.net: Log In to SourceForge.net
thread/74d73758/?limit=25#7552

Sent from sourceforge.net because you indicated interest in
SourceForge.net: Log In to SourceForge.net

To unsubscribe from further messages, please visit
SourceForge.net: Log In to SourceForge.net

~~ */) */) */) ``` */) ~~
Tom Lafleur

PIC24FJ1024GB610
SourceForge.net: Log In to SourceForge.net
thread/74d73758/?limit=25#7552/9169

Sent from sourceforge.net because you indicated interest in
SourceForge.net: Log In to SourceForge.net

To unsubscribe from further messages, please visit
SourceForge.net: Log In to SourceForge.net


PIC24FJ1024GB610
https://sourceforge.net/p/freertos/discussion/382005/thread/74d73758/?limit=25#7552/9169/d23d

Sent from sourceforge.net because you indicated interest in
SourceForge.net: Log In to SourceForge.net

To unsubscribe from further messages, please visit
SourceForge.net: Log In to SourceForge.net

tinchogleria wrote on Friday, July 21, 2017:

I want to share how I finally solved this issue.
I copy from Microchip Explorer16/32 demo application the lcd.c and lcd.h files into the freeRTOS demo application (renaming them to lcd_driver.c and lcd_driver.h) and I used the functions from this files from the originals lcd.c and lcd.h freeRTOS files, commenting the implementation and calling the analog functions coded in lcd_driver.c with a few changes and adaptions.
If anybody need the code, just ask!


I’ve solved the lcd issue, but I could not say that the full run of the demo application was successful.
I had the following issues:
1. Task#2 and Task#4 failed.
2. The demo app is being reseted frecuently.
3. I’m pretty sure that the clock configuration is wrong, and that is causing problems too.
To clarify, Task#2 is what in the code is called ComTestTasks, two tasks related to the use of UART2 and a 9-way serial port included in the version of Explorer16 on which this port was based. Task#4 is what in the code is called BlockTimeTasks, a pair of task wich try to pass some tests related to the use of queues and blocking times.
About the 3 points above, I have:
1. Task#2 is now disable following the recomendation of a member of official support, arguing that tha task is about a port that is no available in the demo board I’m using. Task#4 is still failing with some frequency.
2. Based on other recomendation of a member of official support, I checked Watchdog configuration, and I realized that is turned on. Is not clear if this is how supposed to be or not.
3. I’ve measured with a digital oscilloscope the pulse in the leds that are being blinked by 5 co-routines, and I noted that the relationship between the times measured and the times programmed is 16:1, slower in the measurment. So I try setting the clock speed to 1/16 the actual value, but the result was not good. Everything is REALLY slower now. The specific change I’ve made about this was in FreeRTOSConfig.h file, being the original state:

#define configCPU_CLOCK_HZ				( ( unsigned long ) 16000000 )  /* Fosc / 2 */

And now:

#define configCPU_CLOCK_HZ				( ( unsigned long ) 1000000 )  /* Fosc / 2 */

My BIG questions are:

1) Where are the configurations bits programmed in this demo application sources?
2) Is the watchdog being used or should be disabled?
And the most important:
3) Anyone could run this demo in the current Explorer 16/32 (DM240001-3) having everything working?
Thanks a lot for reading.

rtel wrote on Friday, July 21, 2017:

1) Where are the configurations bits programmed in this demo
application sources?

If they are then you will see the #pragma statements that set the bits
at the top of main.c. If the statements are not there then the bits are
being set via settings in the project (accessed and changed from the IDE).

2) Is the watchdog being used or should be disabled?

The application is not using it at all - not even kicking (resetting)
it. It needs to be disabled.

tinchogleria wrote on Monday, July 24, 2017:

Thanks for your reply.
About WDT, it is disabled now. I haven’t watched the system reseting then.
About configuration bits, is really intriguing for me not see them anywhere in the code.
I’ve read all documentation about starting guides and it never mentions anything about set the configuration bits.

  1. When you set-up the project for the port PIC24, how did you do to set up the configurations bits?
  2. Do all demo applications lack a section of code dedicated to the configuration bits?

I’m not sure how should I configure de bits related to the clock configuration.
3. What clock source should I choose? Where can I find information about this?

I put here the section of the configuration of bits relative to the configuration of the clock in the hope that you can guide me. (Copy-paste from IDE):
// FOSCSEL
#pragma config FNOSC = OSCFDIV // Oscillator Source Selection (Oscillator with Frequency Divider)
#pragma config PLLMODE = DISABLED // PLL Mode Selection (No PLL used; PLLEN bit is not available)
#pragma config IESO = ON // Two-speed Oscillator Start-up Enable bit (Start up device with FRC, then switch to user-selected oscillator source)

// FOSC
#pragma config POSCMD = NONE // Primary Oscillator Mode Select bits (Primary Oscillator disabled)
#pragma config OSCIOFCN = OFF // OSC2 Pin Function bit (OSC2 is clock output)
#pragma config SOSCSEL = ON // SOSC Power Selection Configuration bits (SOSC is used in crystal (SOSCI/SOSCO) mode)
#pragma config PLLSS = PLL_PRI // PLL Secondary Selection Configuration bit (PLL is fed by the Primary oscillator)
#pragma config IOL1WAY = ON // Peripheral pin select configuration bit (Allow only one reconfiguration)
#pragma config FCKSM = CSDCMD // Clock Switching Mode bits (Both Clock switching and Fail-safe Clock Monitor are disabled)