Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

Issues with PIC12F675 range of MicroChips

2 posters

Go down  Message [Page 1 of 1]

1Issues with PIC12F675 range of MicroChips Empty Issues with PIC12F675 range of MicroChips Sat Oct 10, 2020 11:21 pm

MD Harrington



Issues with PIC12F675 range of MicroChips
Date : 10.10.2020
Time: 18:18:06
Hi all
Special word of thank you to the designers of SimulIDE
Its is very impressive
As with all developments I am having one or two issue which I'm hoping someone can throw some light on for me please
When using the IDE to create a basic simulation of 12F675 for simply flashing an LED I am finding that only one port works as output
Ive tried various changes in the code itself then re compiled to hex so as to upload to the simulated device but to no avail
Currently I am testing this to see how this performs
I'm use MPlabX with XC8 compiler to write the code for this so as to see how this performs not that it should make any difference as well we all know Microchip does have a very high standard and after all this is a question of assembler compiled to hex
As this works with GP5 only and I can modify the code easily by simply changing one port pin as suitable output whilst setting TRISIO to all out there should not be any issues as far as I can tell
I'm using Linux openSUSE leap 15.1 as base OS with both 32 bit 64 bit C binaries with simulIDE in 64 bit mode kde environment
Ive uploaded the entire project plus hex plus MPLABX project to github for down load so that all may see this
Advice and rectifications if you can see this would be greatly appreciated as I see this as having a great future
Would someone in your team be kind enough to look into this from me

Mark Harrington and  link for your inspection  is available on git hub

Code using XC8 is below although all is included at github , address above as quoted inclusive MP4 desktop recording showing all that Ive done to date
Code:

/*
* File: main.c
* Author: mark david harrington
*
* Created on 10 October 2020, 13:37
*/
#include <xc.h>
#define _XTAL_FREQ 4000000
#define LED GPIObits.GP5
/* Configuration bits */
#ifdef _PIC12F675_H_
#pragma config CP = OFF, MCLRE = ON, FOSC = INTRCIO, WDTE = OFF, BOREN =OFF
#endif
/* Configuration bits */
#ifdef _PIC12F683_H_
#pragma config CP = OFF, MCLRE = ON, FOSC = INTOSCIO, WDTE = OFF, BOREN =OFF
#endif
void InitPic (void);
void main(void)
{
/* PICMicro initialization */
InitPic();
/* Never ending cycle...*/
while(1)
{
LED^=1; /* LED alternate ON and OFF */
__delay_ms(1000); /* delay macro (200ms) */
}
}
void InitPic (void)
{
/* I/O port configuration */
GPIO = 0x00; // clear port down
#ifdef _PIC12F675_H_
CMCON = 0x07; /* Disable comparators */
#endif
ANSEL = 0x00; /* Disable A/D module */
TRISIO = 0x00; /* All output is set as OUTPUT */
WPU = 0; /* Disable internal pull-ups */
OPTION_REG = 0x80; /* Disable internal pull-ups */
}
And hex code below
Code:

:020000040000FA
:02000000FD2BD6
:1007A600831285010730990083169F018501950103
:1007B600803081000800D3238312050EA000200C90
:1007C6000139A0000130A006A00EA00D05082006E4
:1007D600DF39200685000630A2001330A100AD30B7
:1007E600A000A00BF42BA10BF42BA20BF42BFB2BDC
:0807F600DF2B00288301DE2B3C
:02400E00B431CB
:00000001FF
Once again thanking you all



Last edited by MD Harrington on Sun Oct 11, 2020 3:25 am; edited 1 time in total (Reason for editing : upoad image)

arcachofo

arcachofo

Hi Mark.

Unfortunately the code you shared is using GPIO.5, wich is the one working, so i can not check what is the problem.
Better share an example that shows the problem.

I did some tests (with other compiler) and every Pin is working for me.

3Issues with PIC12F675 range of MicroChips Empty regards Gpio 5 only pic working Mon Oct 12, 2020 1:16 pm

MD Harrington



Thanking you again

I will pace example on net for you regards this with desktop recording to illustrate the issue I'm having

Have a good day

Mark

MD Harrington



Found the issue  Not the coding and not the IDE

Me ... Grrrrrr

 I had two folders identically named with one letter difference  and was loading same  hex file  over and over again  although recompiled  and changes made in code  

That was the issue  so found problem  Thank you  user error  on my side

Thanks for all your help  just checking gpio3  and mclre settings  for external  reset and internal at present but cheers for your patience and help

arcachofo

arcachofo

Hi Mark.

Don't worry about errors, that happens all the time.
Bug reports are extremly important for projects like similide. Testing every single component and every feature for each release is impossible (or would take many months).
So this project is developed in conjunction with users that report bugs or other problems and suggest new features.
Every user that participate in this way is indeed part of simulide team.

Even when all Gpio Pins are working, i found some issues:
- Mclr not working for non-dedicated pins (as you reported in other post).
- TRISIO.3 should always read 1.

So your report was indeed useful.

Regards.

MD Harrington likes this post

6Issues with PIC12F675 range of MicroChips Empty ref MCLRE in config file to on 12F675 Thu Oct 15, 2020 12:30 am

MD Harrington



Many thanks  

I really appreciate your  responses

This is probably the first  time I have had some co operative  replies with regards open source  

I cant say the same for another module  which claimed and blatantly advertised their open source as working  with hardware  but wont go into this in to much detail  save that of to say ,  I was very disappointed  and being some what hard up   and with no finances  I invested what ever I had which in their eyes was probably highly insignificant and unimportant to them

The  problems I had were phenomenal

I had to give up with in the end

I  managed to get the installation bash script working eventually ,   Linux based and it was full of errors  

The IDE which they claimed worked and was why i bought the hardware   well i never really ever got the IDE to work

It crashed every two seconds   the threading was  diabolical  and would seize  every time you clicked a gui component , written  in python

What a joke this was

It would never find the libraries  and the rows we had with them were  it was as if nothing  could ever be wrong with their IDE  

You would post in their site show  actually show them with recordings what  was wrong and they would deny all knowledge of this and never answer or give you all the incorrect answers

I must say this is such an improvement by comparison  I cant tell you the frustration I had with these people and apparently I wasn't the only one either  judging from the level of complaints

How they got away with this I will never know

Thank you  ever so much   I really do appreciate your output to my questions

I cant tell you  the difference  is highly noticeable and am now pleased to  have  tried this  I am  recommending this to others   on this basis as a few have asked me for links etc

Keep up the good work and i wish you much success with this You deserve the acknowledgement

Thanking you

Mark Harrington

arcachofo likes this post

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum