Shop OBEX P1 Docs P2 Docs Learn Events
Problem with CLKFREQ when using uOLED-96-PROP and serial input — Parallax Forums

Problem with CLKFREQ when using uOLED-96-PROP and serial input

DiverBobDiverBob Posts: 1,108
edited 2009-01-03 19:20 in Propeller 1
I ran across an difficult problem a few days ago and haven't been able to figure out what is happening. I hoped someone else can see what I'm missing. The display being used is the uOLED 96PROP using a slightly modified version of the Brilldea driver.

The archive attachment has the test files I have been working with. Basically there is a serial interface to the display at 2400 baud from a seperate PIC processor. All the PIC does is continuously send 3 ADC values preceeded by a 1 (used to identify the start of the data stream). The ADC values are sent as ASCII text seperated by returns (#13). The OLED recieves the ADC data, converts the data to Floating Point values, performs some·simple math·and displays the results. There is a delay timer on the main display loop of 1 second that also blinks a yellow rectangle to show that the loop is repeating.

What happens is that so long as the ADC values coming from the PIC are <100 the display works correctly. But just as soon as any ADC value goes to 100 or greater the repeat loop freezes up solid (the blinking rectangle does not change) until I reduce the input ADC values to less than 100 again. When the ADC values are reduced to under 100,·the CLKFREQ which had been showing a value of 50331648 on the display goes to 0, the blinking rectangle starts blinking very fast and now I can increase the ADC value any value including to > 100 and the loop works correctly but at a much higher·frequency.

It looks like somehow the clock frequency is being reset somehow but I can't figure out how or why this happens or if this is the problem or just another symptom?·Maybe someone else can see what I'm missing...

Thanks for any help!

Bob Sweeney

Comments

  • DiverBobDiverBob Posts: 1,108
    edited 2009-01-03 19:20
    I have continued testing and I think the issue originates in the FullDuplexSerial object. It appears to temporarily stop when the input value is 100 or greater and then starts working again once it is lowered. Once CLKFREQ = 0 then it accepts any value coming in. I still don't see how CLKFREQ is being modified when this occurs.
    Is there a better method of using the FullDuplexSerial object for my purposes? I use GetDec read and convert the ADC values now, I need to read 3 integer values ranging from 0 to 1023 from the ADC.

    Thanks,
    Bob Sweeney
Sign In or Register to comment.