I2CRead and USART interrupt


Closed Thread
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    HenrikBuhl, What is the baudrate you are using? You are only acquiring 1 byte from your eeprom. I to use a 18F6720 with 2 24LC1025's, 2 active ASM driven comms @ 38.4k baud and I read 128 bytes or a page when I turn off all interrupts momentarily. The usart has a 2 byte buffer so if your baudrate is relatively low you should not loose any characters in your comm's. By the way you mention that your LCD dimming flickers. I to have an LCD on my product but I use the CCP1 & CCP2 PWM module's for the contrast as well as the backlight dimming. That way there is a continuous pwm signal to the circuitry + you have 1024 steps of backlighting.

    Dave Purola,
    N8NTA

  2. #2
    Join Date
    Jun 2006
    Location
    Ostbirk, Denmark
    Posts
    2


    Did you find this post helpful? Yes | No

    Default

    Hi Dave,

    thanks for your reply.

    My comms are running at 19,2Kbaud, and actually I am reading 20 bytes from my EEPROM in a For-Next loop.
    This 20-byte-reading is done 4 times just after each other in order to get all 4 lines for the display.
    Unfortunately, I can't use the CCP function for the LCD as they are used for Analog Outputs.

    But! I had a breakthrough just a few minutes after submitting the original post.
    Instead of reading the 20bytes in a For-Loop - reading it as a string seems to solve the problem - even without disabling interrupts.
    The data are garbled anyway, but I can avoid making readouts to the display during communications.

    HenrikBuhl

  3. #3
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    HenrikBuhl, That is the way I read the EEPROM, with the string modifier. My array is 128 bytes in size so it is easy to do page writes and string reads.

    Dave Purola,
    N8NTA

Similar Threads

  1. tmr2 interrupt problem
    By ADCON in forum mel PIC BASIC Pro
    Replies: 27
    Last Post: - 2nd January 2008, 18:49

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