PIC speed problems


Results 1 to 40 of 40

Threaded View

  1. #34
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    Ive managed to sort it out. I almost came back with the info but i wanted to try and fix it myself. Ok, it took about 3 hours but i got there in the end.

    Ive tried changing the pre-scaler too. i thought maybe a 2:1 ratio would free up a little extra processing time. Well, in theory it should because the PWM side of things is only using half the processing power. Unfortunately it didnt affect it in the way i wanted at all. All it did was make the lights flicker a bit because they were flashing too slow so i disabled the pre-scaler.

    Now then, theres a sort of random problem. I currently have VB 6 in a loop sending 513 bytes of data. The PIC is processing the data and setting the PWM values. Well, its setting the same values over and over but its still processing and holding different colors in different PWM positions. Its actually working perfect

    Now the random problem. If i have a scroll bar that sends the data in the onchange/onscroll then the LEDs flicker quite bad. I really dont understand how that could happen. The circuit is obv working and im sending 513 bytes of data so the baud rate isnt so high that its affecting it. The only thing i can think of is the gap between the last byte and the first byte of the next set of data is less than the gap between the bytes in 1 packet. That seems impossible though and if it did that then i wouldnt have thought you would notice.

    Do you have any ideas? I just cant get my head around this one

    Edit: Ive added some code to time the serial data going out of VB. Aparently it sends a full 513 bytes every 35-46 milliseconds and thats when it works fine
    Last edited by The Master; - 7th October 2008 at 22:09.

Similar Threads

  1. Serial VB 2005 pic 16f877a problems
    By Snap in forum mel PIC BASIC Pro
    Replies: 28
    Last Post: - 8th July 2013, 00:52
  2. Pic Vrs Atmel speed
    By shawn in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 26th April 2008, 21:50
  3. Replies: 14
    Last Post: - 26th September 2007, 05:41
  4. IC2 pic 18f452 program problems
    By MrSafe in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 20th September 2007, 18:55
  5. Help, problems first time with 18F452 PIC
    By MikeTamu in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 19th August 2005, 20: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