16-bit Micro Experimenter Board

Get help with your Nuts & Volts projects or Kits purchased from Nuts & Volts here.
denkiguy
Posts: 14
Joined: Tue Oct 27, 2009 8:41 pm
Contact:

Re: 16-bit Micro Experimenter Board

Post by denkiguy »

Matt,

The PWM functionality in the PIC24F series controller is contained in the so called "Output Compare" module. You can find the detailed specification for the Output Compare module at: http://ww1.microchip.com/downloads/en/D ... 39706a.pdf.

The PWM functionality is syncronized with the master instruction clock of the CPU which in the PIC24FJ series can be as high as 16MHz. The output is determined by specifying a clock count that defines the period and duty cycle. You have control down to the interval of one instruction cycle but there are a long list of trade-offs as you can imagine. Most importantly, PWM state changes are triggered by matching the values in a 16-bit timer register. If changes must be made on the fly, you will need enough time to update the pulse width value before the state must change.

There should be plenty of power to control the behavior of one cylinder with one of these 16-bit PICs. In fact, a clever programmer could write code to control multiple cylinders but why ask for trouble? The cost of these parts are a drop in the bucket compared with the rest of the engine. Your system would be much more reliable using multiple controllers.
ricky
Posts: 3
Joined: Wed Mar 31, 2010 9:55 am
Contact:

Re: 16-bit Micro Experimenter Board

Post by ricky »

Hi Denkiguy,

Have just found this thread regarding the Web Server program and would really apprieciate any help you could give me.

I have a reasonable pic16/18 assembler knowledge and started with the Experimenter board as a practical aid to learning C - however I found the Kibacorp software so complete I was even able to add on the SD card and the 128x64 glcd ( from my assembler projects) and get them working first time - despite only being able to flash the led in C !!

I requested the Web software last week and it was sent over with several .hex files but when following the KC web site instructions I could not find the " exp16_web.hex " file. however the only other obvious one was the Pic24fj64.hex file which I programmed in.
However that does come up in Pickit2 as ' warning - no config in hex file ' although it programs in ok.
Have looked at the project code and I can see various config in the code, be could not see how to select the pic24 ??

Anyway - I tried running the program and the display came up correctly, with the rb15 led flashing every 16 seconds and the display refreshed as well.
No matter what cables I tried between my modem and the board or the pc and the board nothing would change.

After a lot of checking, because I have built the enc28j60 as per the olimex diagram, I found your post and connected the pull up to RB2 - the led now flashes at 1sec, the green light on the rj45, comes on when the cable is plugged in ( which it did before ) and now the yellow led quicky flashes every 4 secs.

However when I try the Ping test it still says ' host unreachable'

When I have tried the ping test, from windows command prompt, I have disabled my windows network.

So with my total lack of C am now rather lost - so any help you could give would be really welcome.

thanks

Ricky
denkiguy
Posts: 14
Joined: Tue Oct 27, 2009 8:41 pm
Contact:

Re: 16-bit Micro Experimenter Board

Post by denkiguy »

Ricky,

It sounds like there could be a IP routing problem between your computer and the web server. Is the address range of your local network 192.168.1.####7? If it is, you are in luck. You should be able to ping the server at 192.168.1.201. Since you tried this and it didn't work, my guess your LAN is on a different subnet.

It turns out that my wireless router uses the range of 192.168.0.####7 and so I could not test the web server easily. Here is what I did (until I was able to rebuild the Web Server code to default to a different static address).

1. I have a laptop with a wired NIC port that I rarely use (I normally connect wirelessly). I set the wired NIC to use a static IP address of 192.168.1.1, net mask to 255.255.255.0, and left the gateway blank. The Web Server is connected to the lap top via a switch or hub. Any IP traffic in the subnet 192.168.1.####7 will go out the wired port.

2. The second option is to add a second NIC card to your PC. Any old NIC card will do as the Olimex board only supports 10BaseT. Configure the NIC the same as above.

I hope this helps. If not, let me know and we will try something else.

Denkiguy
ricky
Posts: 3
Joined: Wed Mar 31, 2010 9:55 am
Contact:

Re: 16-bit Micro Experimenter Board

Post by ricky »

Hi Denkiguy,

Thanks for your reply, wasn't sure if you checked this site regularly as the entries are far and few between.

Assume you think the software I used is ok then ?

As for the network connections afraid thats where I am a complete novice - I'm in the UK and use a cable connection via a simple wired rj45 modem to my sole old desktop PC using 10/100 Ethernet.

Looking at the Network connection details none of the adresses are anywhere near 192.

I was assuming that with the PCs rj45 port connected directly to the ENC board using the DOS Ping test would allow me to use any ip address ?

Am actually doing this part of the pic24 hardware to help a friend who is more into C and Pcs than I am, as it clear I am lost on this side of things.
Hopefully with the info you have given, when he returns from work duties after the easter break, we might be able to figure things out.

Thanks again for you help.

Ricky
dyarker
Posts: 1917
Joined: Fri Aug 22, 2003 1:01 am
Location: Izmir, Turkiye; from Rochester, NY
Contact:

Re: 16-bit Micro Experimenter Board

Post by dyarker »

Two things.

The PC and other unit need to on the same network (first 3 bytes of IP).

If you're not going though a hub, you'll probably need a cross-over ethernet cable. Many 10Mbps ethernet ports are not auto-sensing.

Cheers,
Dale Y
denkiguy
Posts: 14
Joined: Tue Oct 27, 2009 8:41 pm
Contact:

Re: 16-bit Micro Experimenter Board

Post by denkiguy »

Ricky,

If the LED is flashing at a rate of once per second and the LCD display is working, the web server app is most likely working properly.

If you plan do a lot of work with the web server app, I recommend you add a second network card to your PC. Almost any cheap NIC card will do. I am using a card I picked up at the local PC recycling center. One of those USB to Ethernet adapters will work also. If you need help setting up the interface to create a 192.168.1.x subset on your PC, I will write up some more detailed instructions.

Denkiguy
ricky
Posts: 3
Joined: Wed Mar 31, 2010 9:55 am
Contact:

Re: 16-bit Micro Experimenter Board

Post by ricky »

Hi Guys
dyarker
you'll probably need a cross-over ethernet cable. Many 10Mbps ethernet ports are not auto-sensing.
That makes sense with the tests I did, the modem clearly is auto sensing but the pc mobo is not as I had to use a xover cable with the pic24 board as the rj45 leds did not come on with the straight cable.
denkiguy
If you plan do a lot of work with the web server app, I recommend you add a second network card to your PC. Almost any cheap NIC card will do
As you say that does seem the simpler way to do things - just checked with a local dealer who has them under $10.

I'm really just the hardware builder in this part of the pic 24 project - its my friend who is really going to be using and coding up his own little network based on this pic24 board.
Apart from this Ethernet part all the other experiments work fine so I will now be able to use it to start my venture into learning C from the very begining.



Thanks for all your patience and help, will cetainly come back if we cannot move forward when he returns from work.

regards

Ricky
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests