error in lcd 16x2 - Page 2


+ Reply to Thread
Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20

Thread: error in lcd 16x237 days old

  1. #16
    Junior Member
    Join Date
    Feb 2020
    Posts
    9
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    0

    0 Not allowed!

    Default Re: error in lcd 16x2

    I have made the changes to the code with the recommended instructions, and the code does not work with pic 18f2550, it only works with pic 18f4550 and changing port b to port d.
    I attach the error image with pic 18f2550Click image for larger version

Name:	ERROR IN SIMULATION PIC 18F2550.jpg
Views:	4
Size:	102.6 KB
ID:	3891

  2. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  3. #17
    Fanatical Contributor top204's Avatar
    Join Date
    Feb 2002
    Posts
    3,513
    Thumbs Up
    Received: 318
    Given: 152
    Total Downloaded
    1.99 GB

    0 Not allowed!

    Default Proton 16x2 LCD with a PIC18F2550 and a PIC18F4550 device

    I've just ran some tests using the Isis simulator and both PIC18F2550 and PIC18F4550 devices, and the 16x2 LCD works on both, and without any warning messages given. I have tried the LCD on several ports and pins and all work as expected. The test program is:

    Code:
        Device = 18F4550
        Declare Xtal = 48
    
        Declare LCD_Type = 0
        Declare LCD_DTPin = PORTD.4
        Declare LCD_RSPin = PORTD.1
        Declare LCD_ENPin = PORTD.0
        Declare LCD_Interface = 4
        Declare LCD_Lines = 2
    
        Declare Hserial_Baud = 9600
        Declare Hrsout_Pin = PORTC.6
    
        Dim MyCounter as Word
    
    '-------------------------------------------------------------------------------------
    ' The main program starts here
    '
    Main:
    
        Cls
        Do
            HrsoutLn Dec MyCounter
            Print at 1,1, Dec MyCounter, "    "
            Inc MyCounter
            DelayMs 200
        Loop
    Notice the HrsoutLn command as well. This is there so the timing of the microcontroller can be checked to be correct, and match the Xtal speed that the compiler is expecting, because if it wasn't, the text on the serial terminal would not be readable. It is not needed in the program, it is there purely for a speed test. Below is a screenshot of the Isis simulator running the above program. Notice the "Simulation Log" window shows nothing, and the program is using the default timings for the LCD commands:

    Click image for larger version

Name:	Screenshot.jpg
Views:	52
Size:	96.2 KB
ID:	3892



    However, it is doubtful if this program would work in the "real world" because the config fuse settings for the PIC18F2550 and PIC18F4550 are rather complex and will need to be altered for the crystal frequency used and the "actual" speed required. If the fuse settings are not set correctly, the microcontroller will run at a "very" different frequency to what the compiler has been told it will be running at and "all" timings will be off. Then all sorts of anomalies will be seen in the microcontroller's functioning that will have nothing to do with the compiler's functionality. Remember.... The compiler's Xtal declare does "not" manage or change the microcontroller's fuse settings! It is there so the compiler can calculate the timings required for the frequency it is told the microcontroller will run at. For most devices, the compiler's use of the standard HS fuse setting as default will allow it to run at the frequency asked with no problems in the real world with crystals up to its maximum, but on all of the USB devices, and some of the newer, non-USB, devices, the config fuse settings have many iterations. Far too many in my opinion.
    Last edited by top204; 21st February 2020 at 20:49.

  4. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  5. #18
    Junior Member
    Join Date
    Feb 2020
    Posts
    9
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    0

    0 Not allowed!

    Default Re: Proton 16x2 LCD with a PIC18F2550 and a PIC18F4550 device

    friend thanks for the help, you know now the code compiles very well with the pic 18f4550, displayed in the message on the lcd 16x2 but does not show the results of capacitors and resistors.
    I attached the images and the connection circuit for the pic and look how I do to register reading of the desired?
    Click image for larger version

Name:	DO NOT display results in lcd 16x2.jpg
Views:	9
Size:	100.8 KB
ID:	3893Click image for larger version

Name:	Pic-Connection-Circuit.jpg
Views:	8
Size:	12.1 KB
ID:	3894

  6. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  7. #19
    Member keytapper's Avatar
    Join Date
    Jun 2019
    Posts
    138
    Thumbs Up
    Received: 6
    Given: 3
    Total Downloaded
    329.46 MB

    0 Not allowed!

    Default Re: error in lcd 16x2

    Frankly I don't expect VSM to perform SPICE results correctly in the analog world. It may not suffice. Just to mention that a cd4060 is not working the oscillator section.

  8. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  9. #20
    Senior Member Stephen Moss's Avatar
    Join Date
    Jan 2006
    Posts
    534
    Thumbs Up
    Received: 31
    Given: 7
    Total Downloaded
    3.87 GB

    0 Not allowed!

    Default Re: error in lcd 16x2

    Quote Originally Posted by Josť View Post
    I have made the changes to the code with the recommended instructions, and the code does not work with pic 18f2550, it only works with pic 18f4550 and changing port b to port d.
    I attach the error image with pic 18f2550Attachment 3891
    It does work on PortB with real hardware, as I previously stated having LVP was the problem in real hardware, the simulator may ignore it but try putting in the fuse configuration with the LVP bit set to off. Unfortunately I cannot try to simulate it myself as Proteus is being stroppy and is generally a huge pain in the ass, for around £8000 I would expect better.

    The user manual provides an example with a 10K resistor and 0.1uF capacitor, perhaps use those fixed values in your simulation and just display VALOR as it is on the LDC, if the simulation is operating correctly the value for VALOR should be close to the value of 602 given in the user manual.

    Quote Originally Posted by Josť
    which of all plugins should I install for the proton ide version 3.6.0.2
    The fuse configurator on page 2 is a must have, I think the majority of Proton users now use it and will often refer to in their replies, other than that it really depends on what you are doing as to which plugins you would need.

    Looking at your code and the user manual I think you need to use figure b (right) on the image you provided, I cannot clearly see how you have connected C and R in your schematic, double check you have them correctly connected.
    In your code you have
    Code:
    R = VALOR /(1450 * 0.1)
    C = VALOR /(1450 * 10)
    are you trying to calculate both C and R at the same time from a single value?
    If so I am not sure that will work, I have never used the RCin command but surely you need to know either C or R to be able to calculate the expected range of values the command returns and a conversion factor to turn them into real world values.

  10. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. DS2408 and LCD 16x2
    By Shaman in forum Proton Plus Compiler v3
    Replies: 0
    Last Post: 10th March 2015, 19:44
  2. [SOLVED !] 8 bit 16x2 LCD Code for 16F84A
    By Jessica in forum Absolute Beginners Section
    Replies: 11
    Last Post: 1st September 2014, 16:51
  3. [SOLVED !] Where to buy enclosure box for 16x2 lcd display?
    By picprotonguy in forum The Lounge
    Replies: 11
    Last Post: 29th October 2012, 18:37
  4. Problem with 16X2 LCD and PIC16F877A for Proton
    By lexma89 in forum Proton Plus Compiler v3
    Replies: 1
    Last Post: 8th December 2011, 14:35
  5. [SOLVED !] Alpha 16x2 LCD
    By rrakke in forum Wish List / Product Feedback
    Replies: 0
    Last Post: 18th March 2003, 14:10

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts