Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Rick314

Pages: [1]
1
Ethernet Boards (8-bit) / SBC65EC Analog Input Settings: How to program?
« on: December 21, 2011, 10:09:10 PM »
The SBC65EC Analog Input Settings web page shows 3 configuration settings: Port Configuration (ADC Off; A0; A0,A1; ... 10 more choices), Voltage Reference Configuration (4 choices), and Acquisition Time (5 choices).  I can't find any HTTP/UDP configuration commands for these 3 settings.  Are there any, or do they have to be manually configured using the web pages?  If the latter case, why?

2
Ethernet Boards (8-bit) / SBC65EC return string defect: No NULL
« on: December 14, 2011, 07:54:37 PM »
The SBC65EC usually returns NULL-terminated strings in response to UDP tag requests.  But in the case of analog voltages in format 0 ("3 digit uppercase hex value") no terminating NULL is provided.

Details: See the Wireshark results below.  I am reading a nearly full-scale voltage level on signal A0, by configuring it as an analog input and querying its value using "%n00" (image 01).  Notice in image 02 that only 3 data bytes are returned, "3FE" with no trailing NULL.  More commonly (images 03 and 04), sending "%n10" (format 1, "Decimal value 0 - 1023") returns the 5 data bytes "1022" and a trailing NULL.  Formats 2,3,4,5,6 also return the expected NULL.

3
Ethernet Boards (8-bit) / SBC65EC/PT24E PWM to DC to Analog Input
« on: December 03, 2011, 11:19:15 PM »
To help learn SBC65EC features I used Pulse Width Modulation (PWM) to generate a 0 to 5 Volt DC signal and measure it as an analog input.  I hope it is useful to others to see how this is done.

Signal G0 (also called "RG0" in the SBC65EC data sheet, also called "D0" on the PT24E-ASM prototype board etched-on signal names) will be the PWM output.  On the PT24E it is near the DIP switch (shipped unloaded) as seen in the photo.  A0 (also called "RA0" on the SBC65EC data sheet) will be the analog input.  On the PT24E it is down near U1 as seen in the photo.  Connect G0 to A0 with a 1 kohm resistor.  This low value allows full-scale output to read "5.00" volts.  On my hardware, anything over about 2.5 kohm makes full-scale voltage "4.99" or less.

A filter capacitor goes from A0 to ground.  Choosing C of 1 uF (tantulum, 35V, + lead to A0) makes a low-pass filter corner frequency of 159 Hz, an RC time constant of 1 ms, and rejects the 39 kHz PWM signal by about 48 dB.  The 1 ms time constant means a 0 to 5V step will settle to 1 mV in about 8.5 ms.  That's it for the hardware.

On the SBC65EC web pages: Port Settings page, Port G, Pin 0, check it (an output), Submit; PWM Settings page, Mode 10-bit, Frequency 39.062 kHz, Channel 3 (Port G0) checked, Remember Settings After Power Up checked, Update; Analog Input Settings page, Port Configuration A0 (or more ports if you want them), Voltage Reference Configuration Vref+ = AVdd Vref- = AVss, Acquisition Time 19.2 us, Update; PWM Values page, Channel 3 (Port G0) to 512 (mid-range), Update; Analog Inputs page, A0, 2.44V (on my hardware).

Pictures following are my SBC65EC/PT24E, scope G0 output showing 39 kHz PWM at value 256 (quarter-scale, so 1/4 time at 5V and 3/4 time at 0V), and unwanted PWM feed-through at A0, with PWM value 512, of about 40 mV.

4
Ethernet Boards (8-bit) / SBC65EC rev 3 Data Sheet errors/omissions
« on: November 30, 2011, 08:48:40 PM »
The SBC65EC rev 3 Data Sheet currently located at http://www.modtronix.com/products/sbc65ec/sbc65ecr3.pdf has the following issues:

Page 5, Analog Inputs,  "The following 10 Daughter Board Connector pins..." is followed by a list of 12 pins.

Page 9, General Commands, omits the LCD Display commands "lk=str" and "ll=str" that are documented in the SBC65EC web server web pages at the LCD Display tab, "here" links (or open source code file cmd.htm in your browser).

12/16/11 update regarding using the "ll=str" command via UDP (and likely HTTP but I didn't test that): The string length is limited to about 30 characters, even though the LCD2S-204 display I am controlling is 4 rows of 20 characters each, or 80 characters total.  So instead of being able to update the whole display with a single UDP packet, it must be artificially broken into multiple packets.  For example, "lk=_f1234567890123456789012345678901234567890" (clear display and fill in the first 2 of 4 lines) gets truncated in the middle of the 2nd line of 20 characters.  I think the string length limit should at least be documented, and then hopefully extended in a future firmware release.  This might be considered a firmware error instead of a documentation error, but I chose to list it here.  In my case 100 would be a good string length limit, for 80 display characters plus several of the in-string control sequences: _n _f _r _b _t.

Page 9, General Commands, New Password, "... will set the new password [not username] to...".

Page 9, General Commands, New NetBIOS name, "... will set the new NetBIOS name [not username] to...".

Page 17, Figure 5, PCB Layout, says "REV 1" on the image instead of "REV 3". (The image appears to be obsolete.)

The rev 1 data sheet at http://www.modtronix.com/products/sbc65ec/sbc65ecr1.pdf has a schematic for rev 1 (1/18/2005).  The rev 2 data sheet at http://www.modtronix.com/products/sbc65ec/sbc65ecr201.pdf has a schematic for rev 2 (12/22/2005).  No schematic diagram at all is included in the rev 3 data sheet.

Please add other SBC65EC rev 3 Data Sheet errors/omissions to this thread.

5
For use with the SBC65EC and PT24E Proto Board, the attached Java program demonstrates setting the 8 LEDs and reading back an 8-section DIP switch mounted on the PT24E.  Many details are given in the header comments of file DemoIO.java.  When run with no parameters, the program outputs usage instructions:

C> java DemoIO
Modtronix SBC65EC + PT24E-ASM Demo Program
Usage: java DemoIO <IP or URL> <delay> <output mode>
   <IP or URL> = SBC65EC IP address or URL
   <delay> = ms delay after each UDP packet send
   <output mode> = 0 (terse) or 1 (verbose)
Examples:
   java DemoIO mxboard 100 0
   java DemoIO 192.168.1.53 50 0
   java DemoIO foo.dyndns.org 200 1

When run in verbose mode it outputs the contents of all UDP traffic between the PC and SBC65EC.  What follows shows the first update (of 257) of the LEDs, and the first read-back (of 17) of the switches.

C> java DemoIO mxboard 100 1
<cc0=0&cc1=0&cc2=0>
<cc0=0&cc1=0&cc2=0>
<cc0=0&cc1=0&cc2=0>
<c1=1&c2=1>
hex LEDs: 00<cc0=0&c0=0&c1n=1&c0=0&c1n=1&c0=0&c1n=1&c0=0&c1n=1&c0=0&c1n=1&c0=0&c1n=1&c0=0&c1n=1&c0=0&c1n=1&c2n=1>
<cc0=1>
<%c00>
>0<
<c1n=1&%c00>
>0<
<c1n=1&%c00>
>1<
<c1n=1&%c00>
>1<
<c1n=1&%c00>
>0<
<c1n=1&%c00>
>1<
<c1n=1&%c00>
>0<
<c1n=1&%c00>
>1<

switches: 10101100
hex LEDs: 01...

Developing the program led to several recent posts in this Forum board, as well as a couple under "Prototype Boards":

A problem mounting DIP switches on the PT24E:
http://forum.modtronix.com/index.php?topic=1506

Confusion that the PT24E board says "PT32E" on it:
http://forum.modtronix.com/index.php?topic=1507

When downloading DemoIO.zip using Firefox 8.0 (and maybe other browsers) it has its name changed to index.php.  After downloading, renaming the file to DemoIO.zip will allow it to be treated like any other .zip file.  The contents are correct.  Just the file name is wrong.

6
Ethernet Boards (8-bit) / SBC65EC UDP control firmware defect
« on: November 15, 2011, 10:44:00 PM »
I think the SBC65EC UDP command "c1n=9", that should take port C1 low for about 9 us and then high, does nothing.

Could any other SBC65EC user verify this?

Modtronix: What is the root cause?  What other SBC65EC UDP commands do not work as documented?  (I know for this problem, using instead "c1=0&c1=1" will make about a 150 us negative pulse that is way longer than I need but is adequate.  I need to know the scope of the defect -- all UDP commands that don't work as documented.)

Details: The SBC65EC data sheet (http://www.modtronix.com/products/sbc65ec/sbc65ecr3.pdf), page 8, "Pulse Port Pin, Negative" describes "c1n=9".  I used the test program uploaded today at http://forum.modtronix.com/index.php?topic=1508.msg4654 to do the following, with the results given.

C> java TestUDP mxboard 0 "cc1=0&c1=0"
sending >cc1=0&c1=0< .

This configures C1 as an output, with value = 0/low.  I verified with an oscilloscope that C1 is low.

C> java TestUDP mxboard 100 "c1p=9"
sending >c1p=9< .......................

I verified this puts a positive pulse on C1 every 100 ms, and the pulse width is 7.8 us.  "c1p=9" works.

C> java TestUDP mxboard 0 "c1=1"
sending >c1=1< .

I verified on the scope that C1 is high.

C> java TestUDP mxboard 100 "c1n=9"
sending >c1n=9< .....................

Nothing!  The scope doesn't trigger.  C1 stays high.  I would expect a negative pulse (high-low-high) every 100 ms with pulse width about 9 us.  (I spent about 8 hours tracking this down and finding the root problem.)


11/16/11 update: Should it be important, I have SBC65EC hardware "REV3" (on the board) and "HW: V3.01, BLN: V1.00, SW: V3.10" (on the MCU sticker).

7
Ethernet Boards (8-bit) / SBC65EC UDP experimentation program (Java)
« on: November 15, 2011, 05:55:02 PM »
The attached .zip file contains 3 files that demonstrate sending UDP packets with user-defined contents, once or repeatedly, to control an SBC65EC.

TestUDP.java (Java source code)
TestUDP.class (Java executable byte code)
TestUDP1.bat (Windows batch file)

If your PC includes Java run-time capabilities, running the program with no parameters will output usage instructions:

C> java TestUDP
Modtronix SBC65EC UDP Test Program
Usage: java TestUDP <IP or URL> <delay> <UDP string>
   <IP or URL> = SBC65EC IP address or URL
   <delay> = ms delay after each UDP packet sent
             (0 means send once and exit)
   <UDP string> = string to send in the UDP packet
Examples:
   java TestUDP mxboard 0 "cc0=0&cc1=0&cc2=0"
   java TestUDP 192.168.1.120 0 "c1=1&c2=1"
   java TestUDP mxboard 100 "c1=0&c1=1"
   java TestUDP foo.dyndns.org 1000 "c1p=9"
End repeating outputs with an operating system break.

As a more complicated usage example, TestUDP1.bat shows how to use the program to control the PT24E rear-panel LEDs.  I developed the Java program to help debug SBC65EC control problems I was having.  I hope you find it useful, and feel free to post any questions or comments as a reply to this post.

Rick

P.S. -- When downloading TestUDP.zip using Firefox 8.0 (and maybe other browsers) it has its name changed to index.php.  After downloading, renaming the file to TestUDP.zip will allow it to be treated like any other .zip file.  The contents are correct.  Just the file name is wrong.

11/16/11 update: I replaced TestUDP.zip with today's version.  TestUDP.bat was updated to reflect a better workaround to the Modtronix SBC65EC firmware defect discussed at http://forum.modtronix.com/index.php?topic=1509.

8
Prototype Boards / Why does ordering a PT24E result in receiving a "PT32E"?
« on: November 14, 2011, 03:38:21 PM »
I ordered and received a PT24E Proto Board, but the board says "PT32E" on it.  See the attached photo.  The PT24E schematic at http://www.modtronix.com/products/pt32e/pt24er1.pdf appears to be correct for my board.  Is this just a mistake on the board itself?  It seems like it should be documented on the product page at http://www.modtronix.com/product_info.php?products_id=230 but is not currently mentioned there.

(The photo shows my board after I added 5 parts to it for DIP switch read-back.  Those parts have nothing to do with this post.  Just notice the red circled label.)

9
Prototype Boards / PT24E DIP switch: non-standard dimensions
« on: November 14, 2011, 03:22:16 PM »
A caution for those adding the user-provided 8 section DIP switch to their PT24E boards -- The PT24E-ASM schematic (http://www.modtronix.com/products/pt32e/pt24er1.pdf) shows an "8 Way DIP Switch".  I think Dual Inline Package (DIP) implies a 0.3 inch spacing between the two rows of switch pins.  But the PT24E-ASM board provides 3 rows of pins, each separated by 0.1 inches, so the outer 2 rows are only 0.2 inches apart.  I mounted my switch, a Digi-Key part number CT1958MST-ND as shown in the picture, by wrapping one row of pins around the outside of the board and soldering them flush to the pads on the underside of the board.

If there are 8 section DIP switches with 0.2 inches between the two pin rows available somewhere, please post a reply so others can purchase a better solution than I have.

10
Ethernet Boards (8-bit) / SBC65EC + PT24E: web page LED control
« on: November 11, 2011, 09:21:18 PM »
4 months ago I posted a Java program to control the 8 LEDs on the PT24E-ASM prototyping board while used with an SBC65EC:
http://forum.modtronix.com/index.php?topic=1409.msg4471

I thought it might be helpful to show how to control the PT24E-ASM LEDs manually, using the SBC65EC web interface.  The LEDs are controlled by a shift register, as shown on the PT24E-ASM data sheet, page 1.  Looking at the PT24E-ASM rear panel, I numbered the LEDs like this:

7 6 5 4
3 2 1 0

The process below lights LEDs 4, 1, 7, and 3, so looks like this:

* _ _ *
* _ * _

Do the following using the SBC65EC web interface.

Port Values page; log in (user admin, password pw are default); Port Settings page; Port C bits 2, 1, 0 should be checked (outputs); Submit; Port Values page; C2 = 1 (click Port C bit 2 until the value is 1); C1 = 1; C0 = 0.  This is the starting state.  Now proceed to output 8 data bits to the LEDs as shown below.  "C1n" means "C1 negative pulse" or change the value of C1 from 1 to 0, let the web page indicate the change, then change the value of C1 from 0 to 1.  This shifts the shift register.  To clarify, the first command "C0=1, C1n" is 3 operations: Click on C0 to make its value 1, click on C1 to make its value 0, and click on C1 again to make its value 1.

C0=1, C1n   Load shift reg with 1 for LED 4
C0=0, C1n   Load shift reg with 0 for LED 0
C1n              Load shift reg with 0 for LED 5
C0=1, C1n   Load shift reg with 1 for LED 1
C0=0, C1n   Load shift reg with 0 for LED 6
C1n              Load shift reg with 0 for LED 2
C0=1, C1n   Load shift reg with 1 for LED 7
C1n              Load shift reg with 1 for LED 3
C2n              Latch out to the 8 LEDs

On the last step, as C2 goes from 0 to 1, the 8 LEDs are output and you should see the pattern described above.

11/14/11 modification: I changed the notation above for "put a negative pulse on C1" from "C1p" to "C1n" to make it read more like the SBC65EC command that should do the same thing, "c1n=0".  Also it is worth noticing that the algorithm here is slightly different than the one used in my 5/8/11 Java program, that used positive-going pulses on C1 and C2.

11/15/11 modification: I removed HTML Courier Font statements because of printing problems with some printers (like mine).

11
http://www.modtronix.com/products/pt32e/pt24er1.pdf is the 4-page schematic/layout of the PT24E.  On the first page there are parts labeled "8 Way DIP Switch - NOT ASSEMBLED".  I am using that board with the SBC65EC mounted on it, and want to read the 8 DIP switches through the indicated 74HC165 shift register.

Can anyone provide example code (any language, or detailed pseudo-code) to read the 8 DIP switches from a computer connected to the SBC65EC via the Internet?

I hope to get something like the example Java code I provided for the SBC65EC/PT24E combination to set its 8 LEDs, posted here:
http://forum.modtronix.com/index.php?topic=1409.msg4471

12
The attached Java program shows how to control the 8 LEDs on the PT24E Prototyping board, when used with an SBC65EC Ethernet Board, by sending it User Datagram Protocol (UDP) packets.  The 8 LEDs count binary from 0x00 to 0xff, with speed set by the program.  How to do this was discovered by reading the SBC65EC and PT24E data sheets.  This was part of a graduate student project I did, so I attempted to comment the code well.  I hope it is useful to other users.  Here are its usage instructions, given when run with no parameters.

C> java LedsOut
Modtronix SBC65EC + PT24E-ASM LED Control Program
Usage: java LedsOut <IP or URL> <delay> <output mode>
   <IP or URL> = SBC65EC IP address or URL
   <delay> = delay between LED outputs (ms)
   <output mode> = 0 (terse) or 1 (verbose)
Examples:
   java LedsOut 192.168.1.53 50 0
   java LedsOut xyz.dyndns.org 200 1

13
http://www.modtronix.com/soft/netloader/ ("Network Bootloader") and http://www.modtronix.com/soft/mxd/ ("Embedded Debugger") both point to http://www.modtronix.com/soft/netloader/netloader_jre150_v107.exe as the Windows Installer for the "new version".  That installer installs Network Bootloader V1.06 (on its window title and Help, About), and Embedded Debugger v1.03 (on its window title and Help, About).  http://www.modtronix.com/soft/netloader/ also points to file http://www.modtronix.com/soft/netloader/version_netloader.txt for version information.  That file doesn't mention "debugger" but says "V1.07 Modtronix Network Bootloader - 2008 July 23, Now uses rxtx serial port library instead of Sun Comm library."

Is there a version history for Embedded Debugger?

Does the installer install the wrong version of Network Bootloader (v1.06 instead of v1.07), or is the version given on Network Bootloader's title bar and "Help, About" wrong (saying "v1.06" when it should say "v1.07")?

14
The attached photo shows a Modtronix SBC65EC/SBC66EC attached to a Microchip PICkit 2/3 In-Circuit Programmer/Debugger, using the Modtronix PGM2KIT ribbon cable.  Notice the PCB/connector on the SBC extends significantly above the nearby 20-pin connector, so the SBC will no longer connect to prototyping boards such as the PT24E-ASM (the other picture).  Questions for Modtronix:

1) Is this incompatibility documented anywhere?  I purchased these items to use them together.

2) Can you provide a PGM2KIT cable alternative that will work with the SBC + Proto Board combination?

15
SBC66EC & SBC66ECL / SBC66EC + PICkit 3, debug build, can't use it
« on: April 14, 2011, 07:43:58 PM »

Update June 2012
Our Netcruzer range of products has now got it's own web site at www.netcruzer.com, with a new forum at www.netcruzer.com/forum.
For all new posts relating to the Webserver Firmware, please USE THIS FORUM.


I can't get a debug build to program onto my SBC66EC.  This is my system:

- Microchip MPLAB IDE v8.66 (3/25/11, latest version)
   - Microchip C Compiler for PIC24 (16-bit) MCUs (aka "C30") v3.25 LITE
- Microchip PICkit 3 In-Circuit Debugger (FW Suite v01.26.52)
- Modtronix SBC66EC Single-Board Computer
   - Microchip TCP/IP Stack v5.31 + Modtronix mods

Using the MPLAB IDE, I can use the PICkit 3 as a *programmer* (it is either a programmer or debugger, not both at the same time), and program a *release* build of the Modtronix-provided code ("TCPIP Demo App" from "Microchip Application Libraries v2010-10-19" modified to work with the Modtronix SBC66EC).  So far so good.

Now I want to switch to using the PICkit 3 as a *debugger*, and build/load a *debugging* release onto the SBC66EC.  (Then I can use hardware breakpoints, query register values, etc.)  Following instructions in the 100-page "PICkit 3 Programmer/Debugger User's Guide available at
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en538340
I set the debugger (MPLAB, Debugger, Select Tool, PICkit 3), change the build type (MPLAB, Project, Build Configuration, Debug), and Build All.  The build looks good:

----------------------------------------------------------------------
Debug build of project `C:\MPLAB\SBC66EC\RN01\TCPIP Demo App\TCPIP Demo App - C30 - SBC66EC.mcp' succeeded.
Language tool versions: pic30-as.exe v3.25, pic30-gcc.exe v3.25, pic30-ld.exe v3.25, pic30-ar.exe v3.25
Preprocessor symbol `__DEBUG' is defined.
Target debug platform is `__MPLAB_DEBUGGER_PK3=1'.
Debug platform options are: `__ICD2RAM=1'.
Thu Apr 14 18:23:24 2011
----------------------------------------------------------------------
BUILD SUCCEEDED

But the load onto PICkit 3 (MPLAB, Debugger, Program) fails:

Programming...  <<< (about 30 seconds, SBC66EC red LED winking)
Programming failed

That's all I have to go on.  I've read about "Configuration Bits" and other related subjects, with every new unknown subject referring to multiple other new unknown subjects.  Two questions:

1) Can you help me?

2) Is there any information from Modtronix on programming the SBC66EC other than http://www.modtronix.com/picboards/prog/ that essentially says "the PICkit 3 will work"?

4/15/11 update: This is holding up progress on a large project important to my graduation in June, so is urgent to me.  I attached an image of the Microchip MPLAB IDE that shows the situation described above, after I select Debugger, Program.  I am suspecting something is wrong with the Configuration Bits shown, that the code defines.  But I am new to PIC MCUs and don't know about the Configuration Bits, or their match to the SBC66EC hardware.  Regardless of whether that is the problem or not, I suspect this is a trivial thing to whoever at Modtronix did their code changes to the Microchip TCP/IP Stack.  (I know Modtronix is "offline" until 4/21, but am hoping someone there is reading this NOW.)

4/24/11 update: Sorry Modtronix, but I dropped development on the SBC66EC because of your limited documentation and support, and switched to the Microchip PIC32 Ethernet Starter Kit:
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en545713
Their hardware, documentation, support, tutorials, and large user community got me from opening their shipment, past the situation described above, in a single day!  I hope you improve the things I just mentioned regarding the SBC66EC, and reply to this post and my other posts:
http://forum.modtronix.com/index.php?topic=1377.msg4347#msg4347
http://forum.modtronix.com/index.php?topic=1385.msg4356#msg4356

Pages: [1]