Sign in

username:

password:



Not a member?

Search basicx



Search tips

Subscribe to basicx



basicx by Keywords

Accelerometer | ADC | ADXL | Adxl20 | AVR | BasicStamp | BX-35 | BX28 | BX35 | COM3 | Compiler | Downloader | EEPROM | Electromagnet | GetADC | GP2D1 | GPS | I2C | IDE | Keypad | LCD | LCD+ | MIDI | Motors | Multitasking | Netmedia | Networking | PCB | PID | PlaySound | PWM | Relays | RTC | Servo | ShiftOut | SitePlayer | SPI | Stack | Timer | USB

Ads

Discussion Groups

Discussion Groups | BasicX | networking 2 BX-01 "no coms"

Discussion forum for the BasicX family of microcontroller chips.

networking 2 BX-01 "no coms" - Tony Brenke - Jan 9 4:13:00 2001

I have a bit of a problem.

I have two bx-01's that I have programed with a simple networking code.
as for wiring I am using two dev boards.
the network jack is wired to the other pin1-to-pin1, pin2-to-pin2 and
pin3-to-pin3.

on the slave controler there is a rampack and LCD module.
that is all that is conected. the termanation resistor is conected on
both boards.

they are powered from a 5v 1amp supply. no problem there.

the master always hangs in the "putnetwork" command.
the master is set to node 200, group 200
the slave is set to node 100, group 200 output from monator window:
"100net start"
then it sits for ever.

anybody have an idea?

master code: (slave bpx file is included in the project)
Dim result As Byte
Dim dis As Byte
Sub Main()
Call sleep(100)
Call openSerialPort(2, 19200)
Call PutB(100)
Do
dis = 1
call putline("net start")
Call putnetwork(100, mainthink_dis1, dis, result)
call putline("net end 1")
dis = result
Call PutB(result)
Call NewLine
Call putnetwork(100, mainthink_dis2, dis, result)
dis = 3
Call putnetwork(100, mainthink_dis3, dis, result)
Loop
End Sub

slave code: runs fine with no problems
Dim tx As String '20 char max

Dim dis1 As Byte
Dim dis2 As Byte
Dim dis3 As Byte
'---------------------------
Sub Main()
sleep (100)
dis1 = 0
dis2 = 0
dis3 = 0
Dim Contrast As Byte
Dim bright As Byte
Call InitializeDisplay
Call ClearScreen
Call sleep(10)
bright = 100
Contrast = bright + 42
Call PutContrast(Contrast)
Call PutBrightness(bright)
Call PutCursorStyle(BlinkingBlockCursor)

Call MoveCursor(1, 1)
tx = " Tony Brenke"
Call AppendString(tx)
Call sleep(1000)

Do
Call MoveCursor(1, 1)
tx = CStr(dis1)
Call AppendString(tx)
Call MoveCursor(2, 1)
tx = CStr(dis2)
Call AppendString(tx)
Call MoveCursor(3, 1)
tx = CStr(dis3)
Call AppendString(tx)
Loop
End Sub
=====
Tony Brenke
North Tacoma, WA

__________________________________________________






(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )


Re: networking 2 BX-01 "no coms" - Tony Brenke - Jan 9 4:40:00 2001

I found this:
Call OpenNetwork(100,200)
it is now in the master code.

the master now doesn't hang, but there is no comunacation between the
two.

--- Tony Brenke <> wrote:
> I have a bit of a problem.
>
> I have two bx-01's that I have programed with a simple networking
> code.
> as for wiring I am using two dev boards.
> the network jack is wired to the other pin1-to-pin1, pin2-to-pin2 and
> pin3-to-pin3.
>
> on the slave controler there is a rampack and LCD module.
> that is all that is conected. the termanation resistor is conected on
> both boards.
>
> they are powered from a 5v 1amp supply. no problem there.
>
> the master always hangs in the "putnetwork" command.
> the master is set to node 200, group 200
> the slave is set to node 100, group 200 > output from monator window:
> "100net start"
> then it sits for ever.
>
> anybody have an idea?
>
> master code: (slave bpx file is included in the project)
> Dim result As Byte
> Dim dis As Byte
> Sub Main()
> Call sleep(100)
> Call openSerialPort(2, 19200)
> Call PutB(100)
> Do
> dis = 1
> call putline("net start")
> Call putnetwork(100, mainthink_dis1, dis, result)
> call putline("net end 1")
> dis = result
> Call PutB(result)
> Call NewLine
> Call putnetwork(100, mainthink_dis2, dis, result)
> dis = 3
> Call putnetwork(100, mainthink_dis3, dis, result)
> Loop
> End Sub
>
> slave code: runs fine with no problems
> Dim tx As String '20 char max
>
> Dim dis1 As Byte
> Dim dis2 As Byte
> Dim dis3 As Byte
> '---------------------------
> Sub Main()
> sleep (100)
> dis1 = 0
> dis2 = 0
> dis3 = 0
> Dim Contrast As Byte
> Dim bright As Byte
> Call InitializeDisplay
> Call ClearScreen
> Call sleep(10)
> bright = 100
> Contrast = bright + 42
> Call PutContrast(Contrast)
> Call PutBrightness(bright)
> Call PutCursorStyle(BlinkingBlockCursor)
>
> Call MoveCursor(1, 1)
> tx = " Tony Brenke"
> Call AppendString(tx)
> Call sleep(1000)
>
> Do
> Call MoveCursor(1, 1)
> tx = CStr(dis1)
> Call AppendString(tx)
> Call MoveCursor(2, 1)
> tx = CStr(dis2)
> Call AppendString(tx)
> Call MoveCursor(3, 1)
> tx = CStr(dis3)
> Call AppendString(tx)
> Loop
> End Sub >
> =====
> Tony Brenke
> North Tacoma, WA
>
> __________________________________________________ =====
Tony Brenke
North Tacoma, WA

__________________________________________________





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: networking 2 BX-01 "no coms" - Tony Brenke - Jan 9 4:49:00 2001

Problem solved, thanks anyway guys.
open both chips with the "recive all broadcast" code or just the slave
and it works now. Call OpenNetwork(&Hffff,200)

=====
Tony Brenke
North Tacoma, WA

__________________________________________________





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )