PIC Micro Card and PCI Parallel Configuration

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
Castle College
Posts: 7
Joined: Mon Mar 01, 2010 11:29 am
Contact:

PIC Micro Card and PCI Parallel Configuration

Post by Castle College »

I'm working on installing some PIC Micro boards for an electronic engineering class that we are running. We have v2 Development Boards that interface using parallel PCI cards that we have purchased for this purpose.

I have set up the card in Device Manager to use the 03BC - 03BE I/O range and set it to LPT2. From within the Assembly for PICmicro V4 course software I can communicate with the board from the options screen, where it will detect the card and report that it is a v2 Development Card. I can also click on the Assemble button (the yellow circle with a letter A) and it says it is successful. When I click on the "Build" button however it does not work. I get the error message on the attached screenshot.

Could anybody please give me an idea where I am going wrong with this?

Thanks

Simon
Attachments
PIC error.JPG
PIC error.JPG (37.79 KiB) Viewed 10071 times

User avatar
Steve
Matrix Staff
Posts: 3421
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: PIC Micro Card and PCI Parallel Configuration

Post by Steve »

This means that the configuration info you have set when configuring the chip is different to the chip you have selected when programming it. You need to make sure that the ASM4PICmicros course is set-up to use the appropriate chip and that PPP is targetting this same chip.

If you're still having problems, please post the ASM file you are creating, the HEX file it generates and a screenshot of the options page in ASMIDE and we'll try to help.

Castle College
Posts: 7
Joined: Mon Mar 01, 2010 11:29 am
Contact:

Re: PIC Micro Card and PCI Parallel Configuration

Post by Castle College »

Hi Steve

These boards are completely new to me, I've never had to deal with them before. I've installed the ASM4 PICmicros software and I think it's set to the correct chip. The number printed on the PIC chip is 168F84 and I have set this in the options for PPP v3 as you can see in the screenshot attached to the bottom of this post.

I'm not really sure what you mean by ASM file however, I'm assuming it's the program file that is sent to the board. If that's the case, I've copied and pasted it below but it seems looking in this file that it might be expecting another chip:

Code: Select all

; TUTA3.ASM  27SEP07

;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 
; Configuration data 
; PICmicro MCU type: 16F88 
; Oscillator: RC mode, slow, VR1 fully clockwise (max.rate) 
; LCD display: off 
; 7-segment display: off 
; Version 3 board settings: J14 links: Digital 
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
;
; The following lines embed configuration data into the PICmicro
	LIST P=16F88
	__CONFIG H'2007', H'3F7A'       ; RC mode
	__CONFIG H'2008', H'3FFC'       ; Clock Fail-Safe disabled
	
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 
				
; using names to ease writing of TUTA2
				
STATUS	EQU	H'03'		; name program location 3 as STATUS
PORTB	EQU	H'06'		; name program location 6 as PORTB
				
	ORG	0		; Reset vector
	GOTO	5		; Goto start of program
	ORG	4		; Interrupt vector
	GOTO	5		; Goto start of program
	ORG	5		; Start of program memory

	CLRF	PORTB		; clear Port B data pins
	BSF	STATUS,5		; Page 1
	CLRF	H'9B'		; Clear the ANSEL register
	CLRF	PORTB		; set all Port B as output via Page 1
	BCF	STATUS,5		; Page 0
				
LOOPIT	BSF	PORTB,0		; set Port B pin 0 to logic 1
	BSF	PORTB,1		; set Port B pin 1 to logic 1
	BSF	PORTB,2		; set Port B pin 2 to logic 1
	BSF	PORTB,3		; set Port B pin 3 to logic 1
	BSF	PORTB,4		; set Port B pin 4 to logic 1
	BSF	PORTB,5		; set Port B pin 5 to logic 1
	BSF	PORTB,6		; set Port B pin 6 to logic 1
	BSF	PORTB,7		; set Port B pin 7 to logic 1
	CLRF	PORTB		; clear all PORTB pins
	GOTO	LOOPIT		; goto address LOOPIT

	END			; final statement
I'm not sure where to get the HEX file from I'm afraid, if you can tell me where to look I'll attach a copy of that also.


The tutor who is running the course has used this program successfully with these boards at other sites but it was set up a long time ago by somebody who no longer works for us so it's been passed on to me to sort out. I really know little about it so if you can give me any further help assistance I'd be massively grateful.
Attachments
pic v2 detect.JPG
pic v2 detect.JPG (54.78 KiB) Viewed 10043 times

User avatar
Steve
Matrix Staff
Posts: 3421
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: PIC Micro Card and PCI Parallel Configuration

Post by Steve »

Thanks.

Your ASM program is designed for a 16F88, but you are trying to program a 16F84A. This is the reason for the failure.

There should be a setting in the ASM4PICmicros course that allows you to select between the '84A, the '88 and the '877A. Please select the 16F84A option and it should all work ok for you.

Castle College
Posts: 7
Joined: Mon Mar 01, 2010 11:29 am
Contact:

Re: PIC Micro Card and PCI Parallel Configuration

Post by Castle College »

Hi Steve

When I select the correct chip from the drop down menu it says "could not identify onboard chip" when I click on the autodetect button. If I choose correct chip from the same dropdown it gets me further when I choose "build" and the pops up a message saying "Hex file has config2 word, but selected chip does not. Continue?" When I click ok it says that the "LPT cable is not connected or the board has no power" and asks me if I want to continue. If I choose ok I get another error saying "Programming Failed: Program(0)". The board is plugged in correctly to the LPT cable and has power because it does detect the chip so I'm not sure why it's saying this.

Thanks again for your help with this.

User avatar
Steve
Matrix Staff
Posts: 3421
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: PIC Micro Card and PCI Parallel Configuration

Post by Steve »

No - you need to choose the correct chip in the course itself. See here:
select chip.png
(15.69 KiB) Downloaded 3738 times
The "getting started" section of the course has more information that might be useful to you.

Also, I think you might have a 16F84 instead of a 16F84A. This should not be a problem, but it does mean you will not be able to autodetect the chip from the PPP program because it does not have the appropriate configuration information.

And as you are using the old v2 development boards, you might find that the crystal oscillator programs (tut25 and onwards) run too slowly. This is because the programs have been designed to work with a 19.6608 MHz crystal, but that board has a 3.2768 MHz crsytal. You may need to edit the delay loops or timer prescaler appropriately.

Castle College
Posts: 7
Joined: Mon Mar 01, 2010 11:29 am
Contact:

Re: PIC Micro Card and PCI Parallel Configuration

Post by Castle College »

Thanks again for your help Steve. The lecturer has left me with two of the ten boards, one of them is a 16F84 and one is a 16F84A. Unfortunately he has no idea how to set these boards up only how to use the software once it has been set up for him so I'm really learning as I go how to do this.

I've selected the correct chip as instructed in your above post but still getting the message about the cable/power not being present. Do you think this is a problem with settings in the software or could it be drivers if it is not seeing the card as being connected? Do you have a link to drivers so that I can ensure that this is correctly set and I can rule that out?

Simon

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: PIC Micro Card and PCI Parallel Configuration

Post by Benj »

Hello Simon

The USB drivers for a v3 Dev board are available from here..
http://www.matrixmultimedia.com/eblock_ ... .php#EB006

You may also need to follow this work around if you are still receiving the USB cable not connected message with a v3 Dev board.
http://www.matrixmultimedia.com/support ... .php?t=508

If you are using a V2 development board (i.e. the parrallel port version) then you can specify the LPT connection by loading PPP and clicking Options -> Options and selecting the LPT V2 dev board option.

Let me know how you get on.

Castle College
Posts: 7
Joined: Mon Mar 01, 2010 11:29 am
Contact:

Re: PIC Micro Card and PCI Parallel Configuration

Post by Castle College »

Thanks for your reply Ben.

I've got a PCI parallel card and I'm using the drivers that come in the box. Should I have a Matrix driver for the parallel card? If I go into device manager and choose to update the driver, I don't have a Matrix driver listed. Is there a download for the parallel version of this card? I get the feeling it might be a driver issue because all of the settings that you have provided are set up correctly now.
Attachments
drivers.JPG
drivers.JPG (86.41 KiB) Viewed 10003 times

Castle College
Posts: 7
Joined: Mon Mar 01, 2010 11:29 am
Contact:

Re: PIC Micro Card and PCI Parallel Configuration

Post by Castle College »

Benj wrote:Hello Simon

If you are using a V2 development board (i.e. the parrallel port version) then you can specify the LPT connection by loading PPP and clicking Options -> Options and selecting the LPT V2 dev board option.

Let me know how you get on.
Hi Ben, we are using the V2 parallel version of the board. I have specified is to LPT connection in PPP options and it does detect the board. The problem I am having now is when I click to build the asm file in ASM4PICmicro it tells me that the parallel cable is not connected or there is no power to the board. We know this isn't right however and everything is correctly connected because the board is identified as a V2 board when I click autodetect on the options screen in PPP.

Castle College
Posts: 7
Joined: Mon Mar 01, 2010 11:29 am
Contact:

Re: PIC Micro Card and PCI Parallel Configuration

Post by Castle College »

Is there a parallel driver somewhere that I can download for these v2 LPT Development Boards? I really need to get this working and we don't currently have any kind of budget to upgrade to the USB boards.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: PIC Micro Card and PCI Parallel Configuration

Post by Benj »

Hello,

No the only driver you should need is the driver for the PCI card. If this is working correctly and emulating a parrallel port address correctly then you should be ok.

Have a look in the device manager under the ports section. Here you should find the PCI card shown up as a LPT device. Double click it to bring up its properties and then goto the resources page. Check that there is an address range sepcified next to the I/O range item.

If there is no address range set then try changing this to 03DC - 03BE

Click ok and hopefully PPP will now be able to communicate with the dev boards.

keshav@solus.in
Posts: 19
Joined: Tue Sep 07, 2010 7:03 am
Contact:

Solution required for PIC16F1933 micocontroller programming

Post by keshav@solus.in »

Hello

presently i am working with PIC 16F1933 micro controller , but PIC16F1933 microcontroller it does not working with default BOOSTC compiler,

I have following query about PIC16F1933 MICRO CONTROLLER flow code programming,

1)Why PIC16F1933 microcontroller flowcode program does not compiling using default BOOSTC compiler,

2)Again purchasing HITECHC compiler it does not worth for me,because HITECH-C compiler evolution version for 45 days, All my development is going on using 16F1933PIC microcontroller, please tell me the alternative solution for compiling and programming for 16F19333 micro controller ,

3)BUT When i was compiling FLOW CODE PROGRAM into HEX file getting ERROR, FOR YOUR KIND REFERENCE I HAVE ATTACHED COMPILIATIONERROR.JPEG FILE, But it will generate C code,

4)Generated c code downloaded into into PIC16F1933 microcontroller using MPLAB working environment, but development board does not working properly,

5)please send me the updated 16f1933 FCD file for pic16F1933 micro controller using default BOOSTC compiler,

IF ANY SAMPLE FLOW CODE RELATED TO 16F1933 PIC MICRO CONTROLLER using BOOSTC compiler PLEASE SEND ME THOSE SAMPLES,

please reply as soon as possible, waiting for your reply,
Attachments
COMPILITAIONERROR.JPG
(88.99 KiB) Downloaded 3373 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Solution required for PIC16F1933 micocontroller programm

Post by medelec35 »

keshav@solus.in wrote:please reply as soon as possible, waiting for your reply,
Hello keshav@solus.in
Reason you are not getting answered is because you need to post your questions involving Flowcode V4 on the Flowcode V4 Topic here:
http://www.matrixmultimedia.com/mmforum ... m.php?f=29

If you can't post there, it is because you have not signed up to the Flowcode V4 Topic which has to be done via your version of Flowcode V4 software.
To sign up do the following:
Run your Flowcode V4 software.
Click 'Help' , 'Online Resources...'
This will open a new browser window.
Enter your Forum user name and email address.
Click submit.
You will not be granted instant access.
Someone at Matrix will have to authorize your user name to post in Flowcode V4 Topic.
I belive that is only done during normal working hours?
Martin

Post Reply