Searching \ for '[PIC]: WLoader RS timing problems - reason found w' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'WLoader RS timing problems - reason found w'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: WLoader RS timing problems - reason found w'
2000\08\28@100518 by wzab

flavicon
picon face
part 1 1833 bytes content-type:text/plain; charset=us-asciiHi All,

 I've found the reason of problems with wloader. Many thanks to the gpsim
developers. I've tried to use MPLAB for that purpose, but its breakpoint
features were much less convenient...

 So I've created the stimuli file (wload.stc - attached to thos letter),
and simulated receiving of "T" command by the WLoader compiled for
18.432MHz/19200baud (the wl18432.diff is the patch file, which should be
applied to the original wloader.asm to obtain my source).
 If someone wants to repeat my experiment, just run gpsim with
gpsim -c wload.stc
command and then enter "run" some times, recording the cycles numbers and
values written to the "porte" register.
 I've stated, that PIC starts sending the start bit at 5241st cycle, ie.
during the stopbit of "T" byte sent by PC =:-( ?!
 So that's probably the reason of problems with newer UARTS, which are much
more sensitive to frame errors...
 In fact the first byte (from the "hardware" echo) should be received with
frame error (which I ignore in my program), and the reception of the second
one depends on the behaviour of the UART.
 As we can see the old 16450s, start reception of the next byte when the
start bit of the previous byte is interrupted, while the new 16550As do not
accept such start bit. And that's all.
 The only solution is to add an additional delay in the wloader, before
sending the start bit, however its source is so sophisticated (a lot of
macros and so on...), that I'm afraid of doing it by my own...
 Let's hope, that Wouter can fix it. (Many thanks to Wouter for his
wonderful and REALLY FREE loader!!!)

--
                       Wojciech Zabolotny
                       http://www.ise.pw.edu.pl/~wzab

http://www.debian.org  Use Linux - an OS without "trojan horses" inside


part 2 197 bytes content-type:text/plain; charset=us-ascii
37c37
<     #define  XTAL D'20'*MHz
---
>     #define  XTAL D'18432'*KHz
92c92
<  port_define PIN, active_low, in_out, async_pin
---
>  port_define PIN, active_high, in_out, async_pin


part 3 822 bytes content-type:text/plain; charset=us-ascii
# gpsim
# Startup command file for stim_test.hex
# Create the processor that's to be simulated

processor pic16f877 fred

# Load the .hex file

load h wl18432.hex

# Create a stimulus node:
node test_node

# Create the stimulus corresponding to the sending of "T" byte
# Sending starts at 3000 cycle:
# 3000 start, 3240 0th bit, 3480 1st, 3720 2nd, 3960 3rd, 4200 4th, 4440 5th
# 4680 6th, 4920 7th, 5160 stop bit, 5400 - and of stop bit
stimulus asy 1 1 3000 0  3240 0 3480 0 3720 1 3960 0 4200 1 4440 0 4680 1 4920 0 5160 1 name asy1 end

# Attach the stimulus to the IO port
attach test_node asy1 porte2

break c 100000
# Set a register write break point when porte is written
break w porte
break w trise
#echo running until the wv break point is hit
#run
#echo running until the cycle break point is hit
run

part 4 131 bytes
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
use spam_OUTlistservTakeThisOuTspammitvma.mit.edu?body=SET%20PICList%20DIGEST>

2000\08\28@103108 by Scott Dattalo

face
flavicon
face
On Mon, 28 Aug 2000, Wojtek Zabolotny wrote:

>   I've found the reason of problems with wloader. Many thanks to the gpsim
> developers. I've tried to use MPLAB for that purpose, but its breakpoint
> features were much less convenient...

Cool! That makes my day!

So I guess you resolved the issues with the Debian/gtkextra/gpsim?

Regards,
Scott

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
use .....listservKILLspamspam@spam@mitvma.mit.edu?body=SET%20PICList%20DIGEST>

2000\08\28@114523 by wzab

flavicon
picon face
On Mon, Aug 28, 2000 at 09:32:11AM -0500, Scott Dattalo wrote:
> On Mon, 28 Aug 2000, Wojtek Zabolotny wrote:
>
> >   I've found the reason of problems with wloader. Many thanks to the gpsim
> > developers. I've tried to use MPLAB for that purpose, but its breakpoint
> > features were much less convenient...
>
> Cool! That makes my day!
>
> So I guess you resolved the issues with the Debian/gtkextra/gpsim?
>
 Yeees!!! I've downloaded the debian sources of exdbm-1.0b2, gtk+extra-0.99.9
and gpsim-0.20.1 packages and unpacked them (with dpkg-source). Then I've
edited the sources in gpsim/gui, changing the "range" argument to "&range"
or "sheet->range" to "&(sheet->range)". AFAIR it affected only two files
gui_src_opcode.c and gui_regwin.c .

 After that all the compilation went smoothly and I've got the working
packages. One important thing. The exdbm and gtk+extra must be installed
BEFORE the compilation of gpsim.

 I was very glad to find the function for setting breakpoint after ANY write
to the particular register (without specifying the value). I couldn't
do it with MPLAB (the only possibility I could find was breakpoint
when contents of the register meets particular condition). (Maybe I'm too
dumb to find the proper option in "user-friendly" GUI...)

--
                       Wojciech Zabolotny
                       http://www.ise.pw.edu.pl/~wzab

http://www.debian.org  Use Linux - an OS without "trojan horses" inside

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
use listservspamKILLspammitvma.mit.edu?body=SET%20PICList%20DIGEST>

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...