PIC16F1939 PORT, EUSART and LCD configuration/set up

Discussion about projects that used PIC Microcontroller, Hardware Interface, Programming Algorithm and etc......

PIC16F1939 PORT, EUSART and LCD configuration/set up

Postby PICTRAIL » Sun Aug 14, 2011 1:00 am

Can someone help with the configuration settings for PIC16F1939. I was using PIC16F877A but due to program memory, i had to change to PIC16F1939. After changing the PIC, LCD message is suppose to be "Kindly Enter 6 Digits Password". Below is the display message. Likewise my USART refused to work.
"Gnvgr"rrgffgrg 6/fkgkv"rcsswo"
I would appreciate your support on the configuration word for USART and LCD.
Regards,
Ebby
PICTRAIL
Apprentice
 
Posts: 40
Joined: Mon Dec 27, 2010 3:32 pm

Re: PIC16F1939 PORT, EUSART and LCD configuration/set up

Postby robosang » Mon Aug 15, 2011 8:08 pm

PIC16F1939, the new enhanced PIC model ? Never use before. But the symtop seem to be wrong baudrate. You should try checking the USART control register in the datasheet of PIC16F1939. It will be good to share with us here. I am sure since it is enhanced, there must be more configuration needed to be done before you can use it correct. Same for the LCD. Though it is just digital output, the register for Analog might be different and you might be using some of the analog pin for LCD.
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: PIC16F1939 PORT, EUSART and LCD configuration/set up

Postby PICTRAIL » Mon Aug 15, 2011 8:41 pm

Thanks...
PIC16F1939 is actually an enhanced version of PIC16F877A. Having program memory of 16k word,an internal oscillator(32Mhz), EUSART and built in LCD driver. It has 2 configuration words. But the problem is setting the configuration words. Meanwhile after setting the watchdogtimer and Oscillator frequency, the program works well with Protues Simulator. However, it doesnt work well after i downloaded it to the PIC. There was an error message from PICKit 2 programmer "Warning: No configuration word in hex file". This is where i need help.
PICTRAIL
Apprentice
 
Posts: 40
Joined: Mon Dec 27, 2010 3:32 pm

Re: PIC16F1939 PORT, EUSART and LCD configuration/set up

Postby Brian Griffin » Mon Aug 15, 2011 8:49 pm

PICTRAIL WROTE:Thanks...
PIC16F1939 is actually an enhanced version of PIC16F877A. Having program memory of 16k word,an internal oscillator(32Mhz), EUSART and built in LCD driver. It has 2 configuration words. But the problem is setting the configuration words. Meanwhile after setting the watchdogtimer and Oscillator frequency, the program works well with Protues Simulator. However, it doesnt work well after i downloaded it to the PIC. There was an error message from PICKit 2 programmer "Warning: No configuration word in hex file". This is where i need help.


The processor you mentioned is quite interesting. I may purchase a few of those newer PIC16F and try these.

Also, is the compiler supporting any of those new PICs? On times it may give the warning if the compiler is outdated.
PIC - UIC00B from Cytron (replacement for my broken PICKit 2), Pickit 3, MikroC for PIC
dsPIC - MikroC for dsPIC, mikromedia board (dsPIC33)
AVR - AVR Dragon
Parallax - Prop tool
User avatar
Brian Griffin
Enthusiast
 
Posts: 403
Joined: Mon Jan 17, 2011 9:36 am

Re: PIC16F1939 PORT, EUSART and LCD configuration/set up

Postby PICTRAIL » Mon Aug 15, 2011 9:11 pm

Hi Brian,
The compiler is ok. It can compile well and it runs well in simulation. Problem occurs only when loading the Hex file to the processor. PIC16F1939 is actually same as PIC16F877A only difference is just that its more enhanced. If you could find anything on its configuration, kindly let me know.
Thanks in advance.
PICTRAIL
Apprentice
 
Posts: 40
Joined: Mon Dec 27, 2010 3:32 pm

Re: PIC16F1939 PORT, EUSART and LCD configuration/set up

Postby ober » Mon Aug 15, 2011 10:01 pm

Hi, yes PIC16F1939 is the new release enhanced version of PIC16F. With great features.

What is the compiler you are using? Are you using Internal crystal and any divider being use? If possible list out your configuration code.

Also the baud rate setting, I think is different compared to PIC16F877A as highlighted by robosang.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: PIC16F1939 PORT, EUSART and LCD configuration/set up

Postby Brian Griffin » Mon Aug 15, 2011 11:08 pm

ober WROTE:Hi, yes PIC16F1939 is the new release enhanced version of PIC16F. With great features.

What is the compiler you are using? Are you using Internal crystal and any divider being use? If possible list out your configuration code.

Also the baud rate setting, I think is different compared to PIC16F877A as highlighted by robosang.


You should check out the newer 16Fs, some of them are equipped with a 5-bit DAC, and some of them with a digital-direct synthesis (for signal generation). Another few is the "Configurable Logic Cells" (CLC) modules they have, it's something like a mini PLD where they have an array of gates (not sure which ones) for your disposal.
PIC - UIC00B from Cytron (replacement for my broken PICKit 2), Pickit 3, MikroC for PIC
dsPIC - MikroC for dsPIC, mikromedia board (dsPIC33)
AVR - AVR Dragon
Parallax - Prop tool
User avatar
Brian Griffin
Enthusiast
 
Posts: 403
Joined: Mon Jan 17, 2011 9:36 am

Re: PIC16F1939 PORT, EUSART and LCD configuration/set up

Postby PICTRAIL » Tue Aug 16, 2011 1:16 am

Wow! Thanks alot for the input. I'm using MPLAB IDE and Hi Tech Compiler.
Btw, I just want to use it for simple LCD Display, Keypad and UART communication. And yes i'm using the internal oscillator which i set to 20Mhz. The hex code is working in simulation but failed to display correct character on the LCD with the real processor and likewise failed to communicate with the uart.
I tried to check the datasheet for configuration settings but nothing works.
PICTRAIL
Apprentice
 
Posts: 40
Joined: Mon Dec 27, 2010 3:32 pm

Re: PIC16F1939 PORT, EUSART and LCD configuration/set up

Postby ober » Tue Aug 16, 2011 9:53 am

Brian, any model that I can try searching for the newer model? Would really like to take a look. 8-)

PICTRAIL WROTE:Wow! Thanks alot for the input. I'm using MPLAB IDE and Hi Tech Compiler.
Btw, I just want to use it for simple LCD Display, Keypad and UART communication. And yes i'm using the internal oscillator which i set to 20Mhz. The hex code is working in simulation but failed to display correct character on the LCD with the real processor and likewise failed to communicate with the uart.
I tried to check the datasheet for configuration settings but nothing works.


A look of schematic/hardware is great. The code also should help us.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: PIC16F1939 PORT, EUSART and LCD configuration/set up

Postby PICTRAIL » Tue Aug 16, 2011 10:13 am

PICTRAIL
Apprentice
 
Posts: 40
Joined: Mon Dec 27, 2010 3:32 pm

Next

Return to PIC Microcontroller

Who is online

Users browsing this forum: No registered users and 2 guests

cron