PIC16F84A using pulsout and TMR0


Closed Thread
Results 1 to 33 of 33

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,621


    Did you find this post helpful? Yes | No

    Default

    Hi Skimask,
    Thank you! I didn't know about that. Please let us know what you find out!

    /Henrik Olsson.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by HenrikOlsson
    Hi Skimask,
    Thank you! I didn't know about that. Please let us know what you find out!

    /Henrik Olsson.


    I just checked it out.
    If you look in any .lst file that contains any LCD defines or usage, you'll see that the LCD_COMMANDUS is a word variable internal to PBP and, as I suspected, LCD_DATAUS is a byte variable internal to PBP. So, you can't use anything higher than 255 in LCD_DATAUS.
    Another thing to be changed in upcoming PBP manuals...
    JDG

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    well, i've NEVER use a higher value than 100uSec (50uSev typical) on those various LCD i work and i worked. I don't believe there's some on the market that will really need more than 100 uSec.

    If the LCD show only Black square it's because it fail to initialise properly or the contrast is set to max.

    Reasons to fail:
    • Too short startup delay, some may need up to secondes... try PAUSE 2000, if it works, reduce it 'till you find a comfort zone
    • Some wires are swapped between them
    • In 4 bit mode, you must use DB4, db5, db6,db7.... AND some model need to send unused pins somewhere gnd or VDD, check the datasheet
    • the R/W is not connected to GND
    • you're using RA.4 without pull-up resistors
    • your supply line is poor and noisy
    • you're using a xtal>4 MHZ and you didn't set HS config fuse
    Last edited by mister_e; - 9th December 2006 at 11:44.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,621


    Did you find this post helpful? Yes | No

    Default

    Hi,
    Thanks for verifying that Skimask!

    Steve, you are most certanly right about the timing, no LCD should need more than 100uS for data. But my advice of trying with 500 was not a very good one since I didn't know of the 8-bit clamp.

    All valid points from you Steve, Dragonballs problem seems to be timing related since it works when he's using a slower clock than 4Mhz. But at 4Mhz it seems to skip the first characters, if I understood it correctly.

    /Henrik Olsson.

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by HenrikOlsson
    Hi,
    Thanks for verifying that Skimask!

    Steve, you are most certanly right about the timing, no LCD should need more than 100uS for data. But my advice of trying with 500 was not a very good one since I didn't know of the 8-bit clamp.

    All valid points from you Steve, Dragonballs problem seems to be timing related since it works when he's using a slower clock than 4Mhz. But at 4Mhz it seems to skip the first characters, if I understood it correctly.

    /Henrik Olsson.


    I think the 500 idea was good enough since 500-256=244. Should be more than enough for a data delay...
    Put a 5 second pause at the beginning of the program, that'll extinguish any doubt about the power up on the LCD. If that don't fix it, it's something else.
    JDG

  6. #6
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default not seeing some code . . .

    Hi DragonBall_6,
    As I didn't see it listed in your code, do you have appropriate define osc X in your code and question 2 is have you set config fuses to HS when trying to use fast oscillator speed?
    JS

  7. #7
    Join Date
    Nov 2006
    Posts
    33


    Did you find this post helpful? Yes | No

    Post Advancing the project:

    Thanks to all the reply,

    After I change it to PIC16F876 and 4Mhz cystal, pause 500, commandus 2000 and dataus 1000. It is work.
    I had adding 4 button to increment the hrs,minute,day and month.
    I feel happy.THANK YOU ALL THAT PROVIDE ME A LOT OF INFORMATION.

    I have thinking to advancing my project by using the A/D function.
    The idea is get the input from the solar PV and sent into the PIC16F876.
    When the voltage is lower than 2 volt then motor stop and vice versa.
    The input voltage from the solar PV is up to 15 volt.

    Can someone help and guide me thru the basic part such as the initialization of the of the PIC???
    Possible that the PIC get the analog input above 5Volt????

    Any suggestion and Please advice....Thanks

Similar Threads

  1. Pin won't stay high during Repeat...Until loop??
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th August 2009, 00:57
  2. Won't go back to SLEEP after 1st Interrupt
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 29th June 2009, 10:00
  3. Battery powered applications
    By NavMicroSystems in forum Off Topic
    Replies: 7
    Last Post: - 22nd June 2009, 08:12
  4. COUNT is not counting again
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 33
    Last Post: - 19th June 2009, 05:52
  5. Can't ID interrupt source with this IntHandler??
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 3rd June 2009, 03:35

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

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