New Controller Board

If no chip is connected, MPLAB (ICD2) will complain, which is what we want. You will probably choose to power your circuit, there is an option for this. MPLAB will “test” for 5v on your circuit. Doesn’t seem to care if you’re just using the “universal programming module” (AC162049) I mentioned. Not needed of course if you’ve got an in-circuit connector.

Maybe we’re talking about two different things. The target chip won’t PROGRAM if there’s no chip w/ proper power. OCCASIONALLY when you change MPLAB versions or PIC families, MPLAB will want to DOWNLOAD new programming algorithms to the ICD2.

There are advantages to OOP’s. I’ve always thought they were more applicable to large programs. Programs seem to get LARGE when doing OOP (C++)! I did C++ on embedded ('386EX) hand held automotive test computer programs. Most of the OOP was for the home-grown GUI. Down in the low levels where I usually coded (drivers and BIOS, test routines), it wasn’t used much.

I wouldn’t doubt that it’s well done and quite innovative! I’m sure they “know their stuff”. But I don’t feel I have time for it (unless it was for a contract), and would prefer to have the portability enjoyed by “stock” (ANSI) style C. Although embedded code typically has “differences” to accommodate different processors, as I’m sure you’re aware.

ATOM BASIC has possibilities, and should definitely be a first choice for hobby introductions into programming. I should probably get one, and become a little more familiar with it. I can compile BASIC with PBP (PIC BASIC PRO), which is similar (but did not have some of the data sizes I needed. Strange). I need a sample!

Too bad, but I can almost guess on the schematic anyway. It IS helpful to see the schematic beforehand to see if they’ve properly used the pins. Especially if you want to port existing projects over to them.

An ICSP connector should be EASY to add. Just (and here we need a schematic again) look at the MCLR pin connections. Should have a 10-20K pullup, and/or sometimes a diode. PGC/PGD (usually RB6/7) should not be driven by the circuit, but it’s usually ok for them to be assigned to drive something. Add jumpers if needed. Add VCC and VSS, and you’ve got it. A little “blue wire” (30ga. Wire-wrap wire) will get you connected.

Alan KM6VV

It turns out I was misreading the error message I was getting. The download was working properly. MPLAB was complaining because it could not verifiy that the chip type I selected was the chip that was connected for programming because I didn’t have a chip connected. So, it looks like everything is working as it should and all I need to do is get the connector I need to connect the ICD2 to the chip I want to program.

Sorry for any confusion I caused. This is very new to me right now. :slight_smile:

I figured it would not be too difficult to add an ICSP connector to an OOBOT board, and there is that nice available prototyping area for such things.

I appreciate your help in getting me going on all of this. Are you saying that RB6/7 should not be driven by outside circuit components, but they can drive outside stuff OK?

8-Dale

Hi Dale,

That’s good! MPLAB DOES like to identify the chip it is programming.
No problem! I’ve got an experienced engineer working with me that occasionally pulls out his hair over MPLAB! I’m glad to help.

Yes, I’d just put it in the prototyping area. I’m surprised they didn’t put an ICSP connector on the board!

You can get away with N/O (normally open) switches, and drive LEDs or what not; it’s usually not much of a problem. If you MUST drive these pins, then simply put a jumper block in to disconnect the components when you need to program.

Alan KM6VV

I just sent an e-mail to Dan at Oricom. I just asked him if adding an ICSP header in the prototype area and wiring it into the board would cause any problems. I also asked him about the possibility of adding an ICSP header on future revisions of the OOBOT boards.

8-Dale

Let me know how the board works! Sounds like you’re getting close.

I’d think they’d go for it, but of course they have to re-lay out the board, and charge for another little connector.

Actually, I’d be surprised if they weren’t using a boot loader of some sort (special chip and all that). You may not NEED ICSP!

Alan KM6VV

I should be able to get my OOBOT board the first of next month at the latest. This will give me time to get comfortable with the MPLAB development environment, programming PICs, etc.

I think there is a possibility for an addition with a later board revision. It could widen the audience for the boards and make them more friendly to those who want to use regular PICs on them. Even if they just make the space for the connector and make the necessary connections to the chip socket, that would be plenty. Doing it that way and letting those who want the ICSP populate those conponents should keep the cost of the boards down.

I have seen mention of bootloaders on the Oricom site, so I will have to investigate this further. Some of the info is rather limited, but I can always ask Dan for clarification.

8-Dale

Do you have any other 40 pin PIC to test code on? You could get “warmed up” on the chips, if you’re not already.

Seems reasonable, especially if they have a reason to do a board rev anyway.

They do? Good. I could get interested in the board if that’s true, and they sell the board separately. I’d like to see a schematic before I order it, 'tho. Could you get a price for the board alone? Or point me to it?

Even if they don’t decide to add the connector, the header I mentioned works good!

Alan KM6VV

I have 4550’s, 4620’s, 4680’s, and some 4685’s. :slight_smile: I also have the 28 pin variants of these.

I will look into this and see what I can find out. So far, I have only seen mention that you can buy the boards without any ooPIC chip, but no price. The Oricom website is somewhat jumbled and various information is spread all around. :frowning: It’s very possible I could have missed some pricing info.

Oh, I will have something working tomorrow, even if I have to plug some jumper wires into the ICSP connector coming from the ICD2 and wire those to the pins of a PIC. :slight_smile: I think I will be able to find a suitable connector though.

8-Dale

Hi Dale,

Here’s a URL for a Master’s Thesis you might find interesting. I haven’t read it through yet.

INSECT-INSPIRED, ACTIVELY COMPLIANT ROBOTIC HEXAPOD

biorobots.cwru.edu/publications/ … -Ant-p.pdf

I have much the same set of PICs. Yes, if you would, see if I can buy a board only. Otherwise I might just draw up a board with Eagle, and mill it on my CNC’d Sherline mill. When you have a schematic or good block diagram, I’d be curious to see what was put on the board.

Do you want me do put an ICSP connector set in an envelope and mail it to you? by the way, I used to have a business contact up there in Beaverton. “Control-C”. Helped me port CP/M to a 8086 system we were developing in Sunnyvale, CA. Is the in-town Nendells restaurant still there? I really like it.

At some point, maybe you want some of my C code (3DoF 'Bot) for one of your processors? Should be fine for an 18F.

I got a reply from Dan at Oricom. :slight_smile: Here is what he had to say:

Here is a picture of the OOBOT-II board:

http://www.thedynaplex.org/robotics/other/img/oobot42a.jpg

It looks like there might be a little rewiring required to make the connector into a fully functional ICSP connection. At least the ICSP connector is nice and close to the main MCU socket.

I went over to our local Norvac Electronics today and picked up 5 connectors I believe will work on a solderless breadboard. It was a whole $1.50 for the connectors, and I got some solid 18 AWG red and black hook up wire too. Now I can properly color code my breadboard power connections. I still need to get some heavier gauge stranded wire so I can lengthen the power wires on the Lynxmotion wiring harnesses I have. They just aren’t quite long enough for my robot.

The Nendell’s that was at the corner of Walker Rd and Canyon Road here in Beaverton is now a Shilo Inn.

You bet I would be interested in this! I just need a bit of time to get everything working with a small program and get comfortable with the development environment.

Well, now it’s time for me to see if these connectors I got will do the trick for me. :smiley:

8-Dale

Hi Dale,

I dug out my 18F452 PIC Book board (PICBOOK.COM), which will also take an 18F4620. Here’s a pix:

http://www.marconettengineering.com/PICBOOK3b.jpg

And here’s an early pix of the 'Bot that my friend built:

http://www.marconettengineering.com/DSCN1938B.jpg

And this is a closeup of a leg:

http://www.marconettengineering.com/DSCN1934B.jpg

Sounds like you’ve got either serial download or with a few jumpers, ICSP. I would expect at least one of these on a proper development board. Much easier then constantly plugging and unplugging chips. The only thing worst would be to have to ERASE EPROMS!

There is an 8x2 LCD, 232, temp sensor, pot, LEDs and switches of course. Also a shaft encoder. I’ve added a few things in the proto area.

The robot pix is an early one. More later after we get it wired up and the boards added. You can see all the hand-made leg parts. the joints are unique, hardware-store nylon bushings. We’ll see how they work out. My first walking 'Bot will be with Lynxmotion leg parts. If I can get enough together!

Give me a little time, and your HAL file (I/O layout), and I’ll compile one for you. Depending how close we get it, you’ll probably have to make tweeks to get it to run on your board.

Alan KM6VV

Hi Alan,

I can’t see the pictures because it is asking me for a user id and password.

The connectors I bought today are going to work perfectly! They make a positive lock with the connector on the ICSP cable of my ICD2 and fit right into my solderless breadboard. :smiley: Now for phase 2: wiring the ICSP connector up so I can program PICs. :slight_smile:

Well, when an ooPIC is installed on the OOBOT board, it uses the usual serial type download for loading new programs like most MCU modules use. I am not sure what the PRG connector setup would be good for so don’t know why they even bother to include it. Real ICSP instead of PRG for the ooPIC would be way better! :smiley:

8-Dale

Hi Dale,

Humm, Maybe this will work. I don’t understand all I know about websites yet! Certainly don’t want public pix in a password area!

I think the existing wiring of the connector is for programming an EEPROM? Not sure how it could serve BOTH uP and EE. If you use the ICSP to program the uP, then you’ll need to make sure that the boot block(s) of the PIC are protected. Otherwise you could erase it! and they probably have additional code on the PIC that needs to stay there. I’m sure they advise you on all that. Which is faster, or more convenient to use? comm or ICSP?

Alan KM6VV

The pictures show up good now. :slight_smile: Very nice.

I think the original idea of the PRG header was for an older parallel programming method. That was replaced with the current serial programing for the ooPIC. It’s probably still included just for legacy stuff, so it would not hurt to change the wiring to be a real ICSP connection to the microcontroller and leave it that way.

Since I have several of each type of PIC, I would likely program later versions of code into a different chip so I could compare the operation of each version in live circuits. I always keep at least three major versions of my code.

I think having both methods available would be the best. :slight_smile: Since I have the ICD2, it can be used for debugging which requires the ICSP connection. I want to learn about and understand how PICs and other MCUs are programmed through a serial connection, so I can use this in my own PICs.

One of my past jobs was doing maintenance programming. Many people don’t appreciate how difficult it can be to go into somebody else’s code and not just fix bugs, but also add completely new functions. I did that for 4 years, so I think I am pretty good at analyzing the code of others and figuring out what it does. I often had to work on code that was several years old where the original programmer had long since left the company.

I have looked into that www.microdesignsinc.com . This might be a worthwhile investment for me sometime soon.

I also got a reply to my second e-mail to Dan at Oricom. He sells the OOBOT boards for $20.00 less without the ooPIC II+ chip. That’s fully assembled. Oh yeah, I am definitely getting an OOBOT board soon. :slight_smile:

8-Dale

Sounds like it. Probably work good for you.

I make it a point to keep all related files in zip files that demonstrate various points of progress or milestones. I often email them back and forth to myself (home vs work). A revision control system would also be and obvious choice. Each set has a loadable file, so it’s easy to “go back”. Email or RCS can take comments on what’s just been done, what works, etc. But you probably knew all that!

Serial connection as in com port download?

Oh I do, I’ve seen a lot of old code. I just “referenced” a 15 year old product (still shipping it) that was C code for an 8051. The original idea was to “port it”, but with all the changes, I just used it to “document” what the product did (industrial laundry controller). With a change from 2 line LCD to 8 lines, and from a 20+ key pad to 6 keys, we quickly decided to just write a new interface. I also started from scratch on the realtime “core” process of running pumps, reading triggers, etc.

The PICbook (QwikFlash) board is a nice little board. Somewhat pricey, but does have a small LCD. I got a free bare board in the $75 USD book, and ordered a list of parts from DigiKey. I think I’ll get a few more boards ($15), and more parts! I would have liked a full header with ALL the signals (pins), but I can always add it. There is a 16 pin header on the BOTTOM of the board!

The book is good, but all the examples are in ASM. That’s fine, but I would have liked C instead. There is new support I hadn’t seen last year when I got the book and board.

microdesignsinc.com/

The LCD is VERY convenient! that’s one thing missing (in my opinion) on the OOPIC board. Still, not a bad price for a populated board. But it’s easy for me to get parts.

Alan KM6VV

Well, serial port programming is really what I meant, like from an IDE to the chip like is done for the ooPIC, Atoms, etc. I see no reason why this could not be done with a standard PIC too. I know there are bootloaders available for PICs.

Ugh, I don’t want to learn assembler, so maybe that book wouldn’t be good for me. I would also prefer something done in C.

The OOBOT boards have the I2C signals brought out to a header on the board, which is very nice. It will be interesting to see how the I2C performs on the ooPIC vs the Atom PRO (which has worked just fine for me). I actually like the fact there is nothing extra on the OOBOT40-II board, like an LCD, motor controller, etc. That way I can add the components I want and interface them the way I want to work with them. I would rather end up paying more to have the extra flexibility.

I decided against the OOBOT40-3 board mainly because it has a bit too much integrated on it, like the motor controller. There is no reason to pay for something I won’t use, because I will be using the Sabertooth controllers for my motor controllers. My final projects will end up costing more, but I will also have exactly the components I want for each function.

I can also get back to working on W.A.L.T.E.R. again since I got my replacement Sabertooth 2x5 controller. :slight_smile:

8-Dale

There are, we have one on a 4620, but it does a bunch of parameter stuff too. I don’t think I need it too much, as I have the ICD2. And I think the ICD2 will work over a USB extension, so that enough. It also leaves the com port free for control purposes; and of course it’s needed for the link to the SSC32.

That sounds good. I’ve done more SPI then I2C, but if one adds a second uP, then it could come in handy. That could be true, but a little LCD and keypad is really quite useful for debug, and especially if the 'Bot is to be autonomous at some point.

I don’t like the '298 motor driver. And that’s true, you do have more flexibility.

Alan KM6VV

I have my Olimex ICD2 connected to the PC using USB, so it does indeed work that way. :slight_smile:

That sounds good. I’ve done more SPI then I2C, but if one adds a second uP, then it could come in handy. That could be true, but a little LCD and keypad is really quite useful for debug, and especially if the 'Bot is to be autonomous at some point.
I had a circuit wired up using three Microchip MCP23017 I/O expanders that connect to the MCU via I2C. I had the 23017’s driving 24 LEDs. One had 16 LEDs (16 bit mode). The 23017’s are nice because they can be run as two 8 bit ports or one 16 bit port. An Atom PRO controlled all this via I2C. :smiley:

My first real PIC project, once I am comfortable with everything, will be to wire up this circuit and have it controlled by a PIC. Since I am already know how this circuit should behave, I will know pretty quick if something is not working right.

8-Dale

Well, I have my power and ground busses on my solderless breadboard all wired the way I want, and the ICSP connector is on the board with an 18F4620 and two MCP23017 chips.

I’m getting the ICSP connector wired up to the PIC now. :slight_smile:

I did not know until now that I still need an external power source for programming the PICs. So, I will have to rumage around and see if I have an appropriate wallwart power supply. I’m sure I have something around here that will work for this.

8-Dale

Hi Dale,

A PIC on a solderless breadboard, that takes me back!

I’ll have to look at the MCP23017. I think it might be on the PICDEM4 board. they used it to interface an LCD.

Yeah, you need a supply for the board. There might be a way around it by configuring MPLAB, but you’re better off adding the power.

Sounds like the '23017 do the same thing as my '597 and '595 shift registers. Can they do read/write?

I’ve got the '452 board powered up and running. Well, I haven’t hooked up the SPI for the PS2 joystick controller, but That shouldn’t be a problem. Most of the work will be wiring up a connector for the SPI.

No LCD yet, but I’ve got a C module for that. Also want to shift over to the 18F4620 chip, as soon as I can find where I put it.

Alan KM6VV