PDA

View Full Version : Only (1) DEBUG works



droptail
- 12th March 2006, 21:10
Any ideas as to why only the latter debug is successfully received when (2) are sent as follows:

start:
Pause 100

DEFINE DEBUG_REG PORTA
DEFINE DEBUG_BIT 0
DEFINE DEBUG_BAUD 2400
DEFINE DEBUG_MODE 1
Debug "A",#w2

Pause 100

DEFINE DEBUG_REG PORTB
DEFINE DEBUG_BIT 7
DEFINE DEBUG_BAUD 2400
DEFINE DEBUG_MODE 1
Debug "A",#w2
GoTo start

My In as follows:

DEFINE DEBUGIN_REG PORTB
DEFINE DEBUGIN_BIT 0
DEFINE DEBUG_BAUD 2400
DEFINE DEBUGIN_MODE 1
DebugIn [wait ("A"),#w2]

I added pauses to see if it helped, and changed the order of Port pins used but the last Debug (of any 2 used) is the only one that is viewable on a Serout LCD.

mister_e
- 12th March 2006, 21:13
it's only because you can't redefine the DEBUG settings. Use SEROUT, SEROUT2 instead

Dave
- 12th March 2006, 22:25
droptail, the second instance is the only one that gets compiled as the first instance gets re-defined at compile time. The way PBP works is that you can only have 1 defined set of DEBUG parameters. That is why the second set of instructions works and not the first.

Dave Purola,
N8NTA

droptail
- 13th March 2006, 03:23
I see. I had worked on SERIN/OUT for a few days and couldn't get it to work. It is working now. Need I pause between these statements or just run them together. There seems to be a long time to go from master PIC to slave then to display on an LCD.

master:
SerOut2 PORTA.0,N2400,["A",w2]
SerOut2 PORTB.6,N2400,["A",w2]
SerOut2 PORTB.7,N2400,["A",w2]

slave:
SerIn2 PORTB.0,N2400,[wait ("A"),w2]
Gosub LCD
SerOut PORTA.3,N2400,[12,27,"F",65,#w3," ",#w2]

One other thing, what is compile timeout (ver 2.40)?

Dave
- 13th March 2006, 11:38
droptail, I am unfamiliar with the term "compiler timeout". What do you mean?
If you are talking about the time that is required for the compile process it varies depending on the size of the program. The longer the program the longer the compile process.

Dave Purola,
N8NTA

mister_e
- 13th March 2006, 14:26
i guess it's the SERIN timeout.

Here's a quote of the PBP manual


An optional Timeout and Label may be included to allow the program to continue if a character is not received within a certain amount of time. Timeout is specified in units of 1 millisecond.

droptail
- 14th March 2006, 04:52
Its a PBP window that pops up after programming 6 - 10 times, and won't compile, just says "compiler timeout..." as if its waiting for something, long after the normal few secs it takes to compile. I close the file or program and re-pull it up to continue working.