Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 17, 2024, 12:24:12 00:24


Login with username, password and session length


Pages: [1]
Print
Author Topic: Bug in the version pbp2.50A  (Read 3498 times)
0 Members and 1 Guest are viewing this topic.
pato
Inactive

Offline Offline

Posts: 5

Thank You
-Given: 0
-Receive: 2

Not by running more, the sun before rises.


« on: January 03, 2008, 04:20:23 16:20 »

 Bug in the version pbp2.50A when using the instruction I2CWRITE in the 16F876.
Logged
mississippi1
Newbie
*
Offline Offline

Posts: 27

Thank You
-Given: 26
-Receive: 7


« Reply #1 on: January 03, 2008, 05:27:48 17:27 »

Can you tell us what you wrote, and what the result was, and what you expected from your code, because this statement has nothing to say for us.
Now it yust a sentence with no value.
Logged
pickit2
Moderator
Hero Member
*****
Online Online

Posts: 4649

Thank You
-Given: 826
-Receive: 4217


There is no evidence that I muted SoNsIvRi


« Reply #2 on: January 04, 2008, 12:07:21 00:07 »

Bug in the version pbp2.50A when using the instruction I2CWRITE in the 16F876.

You bought the software? and are reporting a BUG here? yes we suport all software here.....
lol funny things still happen:)

Can you tell us what you wrote, and what the result was, and what you expected from your code, because this statement has nothing to say for us.
Now it yust a sentence with no value.
Did you report this post as a waste of time?
Logged

Note: I stoped Muteing bad members OK I now put thier account in sleep mode
pato
Inactive

Offline Offline

Posts: 5

Thank You
-Given: 0
-Receive: 2

Not by running more, the sun before rises.


« Reply #3 on: January 09, 2008, 06:00:52 18:00 »

TEST PBP 2.50 & 2.50A:

'DEVICES------------------------------------------------------------------
@ DEVICE pic16F688,HS_OSC
@ DEVICE pic16F688,WDT_OFF ' Watchdog Timer
@ DEVICE pic16F688,PWRT_ON ' Power-On Timer
@ DEVICE pic16F688,BOD_ON ' Brown-Out Det
@ DEVICE pic16F688,CPD_OFF ' Data Memory Code Protect 876
@ DEVICE pic16F688,PROTECT_OFF' Program Code Protection
'-------------------------------------------------------------------------

'DEFINES-----------------------------------------------------------------
DEFINE OSC 20
DEFINE HSER_RCSTA 90h
DEFINE HSER_TSTA 24h
DEFINE HSER_BAUD 19200
DEFINE HSER_CLROERR 1
DEFINE NO_CLRWDT 1

CMCON0=7
ADCON0=7
ANSEL=0
WPUA=0
WPU=0
IOCA=0
PCON=0
PIE1=0

TRISA=%00111111
TRISC=%00100010

INICIO:
PORTC.0=1:PAUSE 1000:PORTC.0=0 ' LED ON / OFF OK
OWOUT PORTA.1,1,[$33] ' <----------- PIC STOP , NO GOTO INICIO
GOTO INICIO






TEST PBP 2.47

'DEVICES------------------------------------------------------------------
@ DEVICE pic16F688,HS_OSC
@ DEVICE pic16F688,WDT_OFF ' Watchdog Timer
@ DEVICE pic16F688,PWRT_ON ' Power-On Timer
@ DEVICE pic16F688,BOD_ON ' Brown-Out Det
@ DEVICE pic16F688,CPD_OFF ' Data Memory Code Protect 876
@ DEVICE pic16F688,PROTECT_OFF' Program Code Protection
'-------------------------------------------------------------------------

'DEFINES-----------------------------------------------------------------
DEFINE OSC 20
DEFINE HSER_RCSTA 90h
DEFINE HSER_TSTA 24h
DEFINE HSER_BAUD 19200
DEFINE HSER_CLROERR 1
DEFINE NO_CLRWDT 1

'ALL DIGITAL MODE

CMCON0=7
ADCON0=7
ANSEL=0
WPUA=0
WPU=0
IOCA=0
PCON=0
PIE1=0

TRISA=%00111111
TRISC=%00100010

INICIO:
PORTC.0=1:PAUSE 1000:PORTC.0=0 ' LED ON / OFF OK
OWOUT PORTA.1,1,[$33] ' <----------- PIC NO STOP OK
GOTO INICIO 'OK GOTO INICIO


When compiled with pbp 5.xx or higher on the lines OWINOUT the micro stands and not continue the process, the same thing happens if you use SEROUT/SEROUT2. If you compile with pbp 2.47 then it works well.


Posted on: January 09, 2008, 06:53:56 18:53 - Automerged

Yep. There is a problem in the OWOUT library routine that causes a continuous loop if the
defined OSC > 8.

Open your pbppic14.lib. Scroll down to the OWOUT library routine.



Change this;

Code:
iorwf   INDF, F     ; Set to input then wait ~10us for recovery
    decfsz  R1 + 1, F   ; Do next bit, if any
  if (OSC > Cool
    movlw    9          ; Delay 9us
    call     PAUSEUS
  endif
    goto     owoutloop

-----------------------------------------------------
To this;
Code:
    iorwf    INDF, F     ; Set to input then wait ~10us for recovery
   if (OSC > Cool
    movlw    9           ; Delay 9us
    call     PAUSEUS
   endif
    decfsz  R1 + 1, F    ; Do next bit, if any
    goto    owoutloop

------------------------------------------------------------

decfsz R1 + 1, F needs to be after if (OSC > Cool and just before goto owoutloop or you're stuck
in a nasty continuous loop whenver OSC > 8.

Regards.
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC