View previous topic :: View next topic |
Author |
Message |
jambox5
Joined: 06 Mar 2013 Posts: 4 Location: St. Cloud State University
|
CCS with SNMP for PIC18 chip |
Posted: Wed Mar 06, 2013 12:20 pm |
|
|
Hello, I'm very new to TCP/IP and SNMP but I'm currently trying to make a pic driven device which will basically have a pic chip, an ethernet port, and an LCD 16x2 display. All I'd like to do is get what's typed on a C# GUI on a user PC and Display this on the LCD via internet connection. Tutorials/information on ethernet and PIC chips is providing fairly hard to find... I'm looking for basic tutorials/ more info on:
-How to set up communication between a PIC and GUI with SNMP protocol
-Which software is going to be best? I'm currently using Visual C# 2010 and CCS C compiler
-Which PIC chips would you recommend for SNMP related tasks?
I apologise if this has been covered previously, like I'd said I'm extremely new to TCP/IP and SNMP so I don't really know where to start :/ |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9243 Location: Greensville,Ontario
|
|
Posted: Wed Mar 06, 2013 2:27 pm |
|
|
Google !
'PIC18 SNMP C code' brought back 65,000,000 + hits
I scanned first 3 pages and found several probable 'hits'..... |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Wed Mar 06, 2013 5:05 pm |
|
|
Go to the Microchip website, with a few clicks you arrive on the Application Notes Browse page: http://www.microchip.com/wwwcategory/TaxonomySearch.aspx?show=Application%20Notes&ShowField=no
Here you will find a wealth of good documented code examples.
Under 'Wired communication' select 'Ethernet', then click 'Search' and you will find "AN870 - An SNMP Agent for the Microchip TCP/IP Stack".
I didn't look into it but the title sounds very promising. |
|
|
jambox5
Joined: 06 Mar 2013 Posts: 4 Location: St. Cloud State University
|
|
Posted: Mon Mar 25, 2013 12:28 pm |
|
|
I appreciate this info, but by the looks of it these are for C18 & C32 compilers, I was curious if anyone had recommendations for CCS compiler as I am more comfortable with it. |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Mon Mar 25, 2013 8:24 pm |
|
|
Quote: |
recommendations for CCS compiler
|
translate the COPIOUS examples from other C compilers or ASM
TO CCS style and functions.
thats what I have done in the past, and would do again,
if i had this problem |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
|
Posted: Tue Mar 26, 2013 8:38 am |
|
|
The best chips for Ethernet/TCPIP are the PIC18's with built-in ethernet like the PIC18F97J60.
Ethernet is on the chip.
Microchip has an entire app library for TCPIP that includes SNMP.
You are right though, it's made for MCHP compilers like the C/XC series compilers.
On that note though, if you have not dived into TCPIP (and SNMP) and terms like UDP and TCP are foreign terms to you (or you don't know the OSI protocol layer model) -- you're in for a LOT of required learning.
You might be best off downloading the free version of XC8 and MPLAB-X for this project.
I can't really recommend CCS for this particular task (as much as I love their compiler).
EDIT: Microchip even makes a DemoPCB perfect for what you want to do called the PICdem.net2 -- it has everything you described already.
PIC18F97J60, EEPROM, LCD, Ready-To-Go Ethernet and most important an MPLAB project READY TO GO - just configure the environment, add your code and compile.
As a student (I'm guessing doing a project and on a schedule for class) -- you need to ask yourself how much of the little time you have to spend on this project coding, versus learning about complex things that will consume most of that time leaving little left for coding. _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1635 Location: Perth, Australia
|
|
Posted: Tue Mar 26, 2013 10:30 am |
|
|
bkamen wrote: | The best chips for Ethernet/TCPIP are the PIC18's with built-in ethernet like the PIC18F97J60. |
I do a lot of work with PIC and Ethernet. I would use a PIC18 processor as a last resort because of its limited amount of RAM, crude support for multilevel interrupts, and, in the case of the PIC18F97J family, limits the interface to 10M half duplex.
If you want to use the CCS compilers then consider a PIC24/dsPIC33 with an ENC424J600 family Ethernet controller. A two chip solution but far more flexible. A single chip high performance solution includes the PIC32MX family of controllers with embedded Ethernet controller however their footprint is harder to work with for a hobbyist/enthusiast and there is no CCS compiler for the PIC32 family. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
|
Posted: Tue Mar 26, 2013 9:51 pm |
|
|
asmallri wrote: | bkamen wrote: | The best chips for Ethernet/TCPIP are the PIC18's with built-in ethernet like the PIC18F97J60. |
I do a lot of work with PIC and Ethernet. I would use a PIC18 processor as a last resort because of its limited amount of RAM, crude support for multilevel interrupts, and, in the case of the PIC18F97J family, limits the interface to 10M half duplex.
If you want to use the CCS compilers then consider a PIC24/dsPIC33 with an ENC424J600 family Ethernet controller. A two chip solution but far more flexible. A single chip high performance solution includes the PIC32MX family of controllers with embedded Ethernet controller however their footprint is harder to work with for a hobbyist/enthusiast and there is no CCS compiler for the PIC32 family. |
Right -- which is why I think the PICdem.net2 is a good starting point to get dirty.
PIC32 -- no CCS.
PIC24 -- CCS -- good luck getting CCS to work. Ugh.
great hardware -- but the beginner has a lot more to learn.
It's brutal.
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
thefloyd
Joined: 02 Sep 2009 Posts: 46
|
|
Posted: Thu Mar 28, 2013 5:32 pm |
|
|
There's always the option to use something like the WizNet W5100/W5200.
The WizNet chips handle all of the hard work of managing and running a TCP/IP stack and your PIC can be devoted to the application code. Obviously this wouldn't be the most inexpensive way to send a product to production, but for hobbyist use they really can't be beat. |
|
|
jgschmidt
Joined: 03 Dec 2008 Posts: 184 Location: Gresham, OR USA
|
|
Posted: Thu Mar 28, 2013 7:02 pm |
|
|
CCS has several TCP/IP development kits that come with step-by-step tutorials. This is how I got my start with PICs and TCP/IP. Unfortunately the CCS TCP/IP stack is a bit anemic, however it may be enough for what you want to do.
I've since switched to Microchip compilers and their TCP/IP libraries for any TCP/IP work. I still stay with CCS for most everything else, though.
The WizNet chips mentioned above also work quite well if you want to off-load the heavy lifting. Saelig has several WizNet boards I've found useful. I've got low-end PICs talking to them via serial ports. Saved me many, many hours of coding and debugging. _________________ Jürgen
www.jgscraft.com |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
|
Posted: Fri Mar 29, 2013 12:14 am |
|
|
jgschmidt wrote: |
I've since switched to Microchip compilers and their TCP/IP libraries for any TCP/IP work. I still stay with CCS for most everything else, though.
|
The CCS stack is Microchip's old v3.75 stack converted.
And yes, the current MCHP stack is way beyond what the CCS conversion will do.
I have to give MCHP credit for the work they've put in their stack.
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
orazio
Joined: 03 Sep 2010 Posts: 27
|
|
Posted: Mon Jun 30, 2014 2:48 am |
|
|
Good Morning,
I'm very new to TCP/IP and SNMP but I'm currently trying to make a pic driven device with PIC18F67J60 which implents an agent SNMP.
I'm using PCH 4.140 and CCS stack TCP/IP v3.3.
I don't find SNMP sample code in the CCS stack.
I will appreciate if someone could answer to my questions:
1) Does CCS stack TCP/IP v3.3 implement SNMP protocol?
2) Is there a sample code or tutorial to start with CCS SNMP?
3) Using CCS PCH 4.140 compiler and the last version "CCS stack TCP/IP v3.3" is it possible to implements an agent SNMP on PIC18F67J60 or i have to leave CCS compiler and use another compiler platform, as the C18 of the microchip?
I look forward to your kind reply.
Orazio |
|
|
orazio
Joined: 03 Sep 2010 Posts: 27
|
|
Posted: Mon Jun 30, 2014 2:10 pm |
|
|
Hello CCS Forum,
is there some kind soul and expert CCS guru who has experience with SNMP and that can give me any suggestion?
Thanks in advance. |
|
|
jgschmidt
Joined: 03 Dec 2008 Posts: 184 Location: Gresham, OR USA
|
|
Posted: Mon Jun 30, 2014 4:27 pm |
|
|
The Microchip compilers and TCP/IP stack are both free and they are well supported by Microchip and other forums. Embedded TCP/IP is tough, both the hardware and the software. You first should get a working system using one of the Microchip development boards. Select a board that is as close to your target as possible. The compiler and TCP/IP stack have options to run "out of the box" on the development boards. Once you have something up and running you can gradually migrate to your target configuration. Perhaps first get your SNMP system working. Then you can figure out how to migrate to your target hardware. When embedded TCP/IP doesn't work it's really hard to find out why - is it the hardware or is it the software? There is no cheap or easy way to do this.
I've worked with both CCS and Microchip TCP/IP stacks and figured out how to migrate from CCS and Microchip development boards to custom hardware. Based on that experience, that's what I recommend.
I published an article 4 years ago that describes how to get the Microchip TCP/IP to run on custom hardware. It might help you on your journey. It's available on my website.
Regards, _________________ Jürgen
www.jgscraft.com |
|
|
orazio
Joined: 03 Sep 2010 Posts: 27
|
|
Posted: Tue Jul 01, 2014 1:27 am |
|
|
Hello jgschmidt, thanks for your recommendation.
My developement board is PIC_MAXI_WEB OLIMEX
[url]
https://www.olimex.com/Products/PIC/Development/PIC-MAXI-WEB/
[/url]
with on board PIC18F97J60. Software example are based on Microchip's stack v5.42 anc Microchip's C18 compiler.
The problem is that I don't use Microchip's C18 compiler. I Know and work with CCS PCH 4.140 compiler.
So i need to create an SNMP agent using CCS PCH 4.140 compiler and TCP/IP stack library provided by CCS support.
The problem is that i don't find SNMP sample code neigther in CCS TCP/IP stack installation nor in "Development Kit For the PIC MCU Exercise Book 3.3V"
http://www.scribd.com/doc/185980032/Development-Kit-for-the-3-3V-Ethernet-Controller-Exercise-Book
So my question for you and CCS people are:
- have you ever development SNMP application with CCS PCH 4.140 compiler?
- Do you know samples code or tutorial to start with CCS SNMP?
Thanks in advance.
Regards |
|
|
|