Hi, I have a problem with the PORTB bit 0 I set this bit in output and I
write values but without success I don't get anything from the I/O.
for (i=0;i<8;i++) BitWrPortI(PBDDR,&PBDDRShadow,1,i);
while(1) WrPortI(PBDR, &PBDRShadow,i++);
Thanks for your time
Sylvain Bissonnette
PortB question
Started by ●March 3, 2013
Reply by ●March 4, 20132013-03-04
Does Port B have the option to be open-collector? If so, is that set
correctly?
--- In r..., Sylvain Bissonnette wrote:
>
> Hi, I have a problem with the PORTB bit 0 I set this bit in output and I
> write values but without success I don't get anything from the I/O.
>
> for (i=0;i<8;i++) BitWrPortI(PBDDR,&PBDDRShadow,1,i);
>
> while(1) WrPortI(PBDR, &PBDRShadow,i++);
>
> Thanks for your time
> Sylvain Bissonnette
>
--- In r..., Sylvain Bissonnette wrote:
>
> Hi, I have a problem with the PORTB bit 0 I set this bit in output and I
> write values but without success I don't get anything from the I/O.
>
> for (i=0;i<8;i++) BitWrPortI(PBDDR,&PBDDRShadow,1,i);
>
> while(1) WrPortI(PBDR, &PBDRShadow,i++);
>
> Thanks for your time
> Sylvain Bissonnette
>
Reply by ●March 5, 20132013-03-05
No I check and that's not the problem, the pin is stuck high
On Mon, Mar 4, 2013 at 12:49 AM, seecwriter wrote:
> **
> Does Port B have the option to be open-collector? If so, is that set
> correctly?
>
> --- In r..., Sylvain Bissonnette wrote:
> >
> > Hi, I have a problem with the PORTB bit 0 I set this bit in output and I
> > write values but without success I don't get anything from the I/O.
> >
> > for (i=0;i<8;i++) BitWrPortI(PBDDR,&PBDDRShadow,1,i);
> >
> > while(1) WrPortI(PBDR, &PBDRShadow,i++);
> >
> > Thanks for your time
> > Sylvain Bissonnette
> >
>
On Mon, Mar 4, 2013 at 12:49 AM, seecwriter wrote:
> **
> Does Port B have the option to be open-collector? If so, is that set
> correctly?
>
> --- In r..., Sylvain Bissonnette wrote:
> >
> > Hi, I have a problem with the PORTB bit 0 I set this bit in output and I
> > write values but without success I don't get anything from the I/O.
> >
> > for (i=0;i<8;i++) BitWrPortI(PBDDR,&PBDDRShadow,1,i);
> >
> > while(1) WrPortI(PBDR, &PBDRShadow,i++);
> >
> > Thanks for your time
> > Sylvain Bissonnette
> >
>
Reply by ●March 5, 20132013-03-05
Which module are you using?
On 3/4/2013 9:52 PM, Sylvain Bissonnette wrote:
> No I check and that's not the problem, the pin is stuck high
>
> On Mon, Mar 4, 2013 at 12:49 AM, seecwriter > > wrote:
>
>
>
> Does Port B have the option to be open-collector? If so, is that
> set correctly?
>
> --- In r...
> , Sylvain Bissonnette wrote:
> >
> > Hi, I have a problem with the PORTB bit 0 I set this bit in
> output and I
> > write values but without success I don't get anything from the I/O.
> >
> > for (i=0;i<8;i++) BitWrPortI(PBDDR,&PBDDRShadow,1,i);
> >
> > while(1) WrPortI(PBDR, &PBDRShadow,i++);
> >
> > Thanks for your time
> > Sylvain Bissonnette
>
--
------
Scott G. Henion, Consultant
Web site: http://SHDesigns.org
------
On 3/4/2013 9:52 PM, Sylvain Bissonnette wrote:
> No I check and that's not the problem, the pin is stuck high
>
> On Mon, Mar 4, 2013 at 12:49 AM, seecwriter > > wrote:
>
>
>
> Does Port B have the option to be open-collector? If so, is that
> set correctly?
>
> --- In r...
> , Sylvain Bissonnette wrote:
> >
> > Hi, I have a problem with the PORTB bit 0 I set this bit in
> output and I
> > write values but without success I don't get anything from the I/O.
> >
> > for (i=0;i<8;i++) BitWrPortI(PBDDR,&PBDDRShadow,1,i);
> >
> > while(1) WrPortI(PBDR, &PBDRShadow,i++);
> >
> > Thanks for your time
> > Sylvain Bissonnette
>
--
------
Scott G. Henion, Consultant
Web site: http://SHDesigns.org
------
Reply by ●March 5, 20132013-03-05
MicroCore RCM6700
On Tue, Mar 5, 2013 at 3:34 AM, Scott Henion wrote:
> **
> Which module are you using?
>
> On 3/4/2013 9:52 PM, Sylvain Bissonnette wrote:
>
> No I check and that's not the problem, the pin is stuck high
>
> On Mon, Mar 4, 2013 at 12:49 AM, seecwriter wrote:
>
>> Does Port B have the option to be open-collector? If so, is that set
>> correctly?
>>
>> --- In r..., Sylvain Bissonnette wrote:
>> >
>> > Hi, I have a problem with the PORTB bit 0 I set this bit in output and I
>> > write values but without success I don't get anything from the I/O.
>> >
>> > for (i=0;i<8;i++) BitWrPortI(PBDDR,&PBDDRShadow,1,i);
>> >
>> > while(1) WrPortI(PBDR, &PBDRShadow,i++);
>> >
>> > Thanks for your time
>> > Sylvain Bissonnette
>> >
> --
> ------
> Scott G. Henion, Consultant
> Web site: http://SHDesigns.org
> ------
>
>
>
On Tue, Mar 5, 2013 at 3:34 AM, Scott Henion wrote:
> **
> Which module are you using?
>
> On 3/4/2013 9:52 PM, Sylvain Bissonnette wrote:
>
> No I check and that's not the problem, the pin is stuck high
>
> On Mon, Mar 4, 2013 at 12:49 AM, seecwriter wrote:
>
>> Does Port B have the option to be open-collector? If so, is that set
>> correctly?
>>
>> --- In r..., Sylvain Bissonnette wrote:
>> >
>> > Hi, I have a problem with the PORTB bit 0 I set this bit in output and I
>> > write values but without success I don't get anything from the I/O.
>> >
>> > for (i=0;i<8;i++) BitWrPortI(PBDDR,&PBDDRShadow,1,i);
>> >
>> > while(1) WrPortI(PBDR, &PBDRShadow,i++);
>> >
>> > Thanks for your time
>> > Sylvain Bissonnette
>> >
> --
> ------
> Scott G. Henion, Consultant
> Web site: http://SHDesigns.org
> ------
>
>
>
Reply by ●March 5, 20132013-03-05
#define BYTE_OFF 0xFF
#define BYTE_ON 0x00
#define BIT_OFF 1
#define BIT_ON 0
// Set all the Port B as outputs(default high logic):
WrPortI(PBDDR, &PBDDRShadow, BYTE_OFF);
// Or:
for(i=0;i<8;i++) BitWrPortI(PBDDR, &PBDDRShadow, BIT_OFF, i);
=================================================================// Port B will be active(on) if trigger with low logic as follows:
WrPortI(PBDDR, &PBDDRShadow, BYTE_ON);
//Or:
for(i=0;i<8;i++) BitWrPortI(PBDDR, &PBDDRShadow, BIT_ON, i);
--- In r..., Sylvain Bissonnette wrote:
>
> Hi, I have a problem with the PORTB bit 0 I set this bit in output and I
> write values but without success I don't get anything from the I/O.
>
> for (i=0;i<8;i++) BitWrPortI(PBDDR,&PBDDRShadow,1,i);
>
> while(1) WrPortI(PBDR, &PBDRShadow,i++);
>
> Thanks for your time
> Sylvain Bissonnette
>
#define BYTE_ON 0x00
#define BIT_OFF 1
#define BIT_ON 0
// Set all the Port B as outputs(default high logic):
WrPortI(PBDDR, &PBDDRShadow, BYTE_OFF);
// Or:
for(i=0;i<8;i++) BitWrPortI(PBDDR, &PBDDRShadow, BIT_OFF, i);
=================================================================// Port B will be active(on) if trigger with low logic as follows:
WrPortI(PBDDR, &PBDDRShadow, BYTE_ON);
//Or:
for(i=0;i<8;i++) BitWrPortI(PBDDR, &PBDDRShadow, BIT_ON, i);
--- In r..., Sylvain Bissonnette wrote:
>
> Hi, I have a problem with the PORTB bit 0 I set this bit in output and I
> write values but without success I don't get anything from the I/O.
>
> for (i=0;i<8;i++) BitWrPortI(PBDDR,&PBDDRShadow,1,i);
>
> while(1) WrPortI(PBDR, &PBDRShadow,i++);
>
> Thanks for your time
> Sylvain Bissonnette
>
Reply by ●March 5, 20132013-03-05
Not work, when DC is programming flash PB0 give data, but as soon the code
start there is nothing on PB0 and DC give error "while debugging timeout"
Any Clue?
On Tue, Mar 5, 2013 at 7:40 PM, d...@ymail.com wrote:
> **
> #define BYTE_OFF 0xFF
> #define BYTE_ON 0x00
>
> #define BIT_OFF 1
> #define BIT_ON 0
>
> // Set all the Port B as outputs(default high logic):
> WrPortI(PBDDR, &PBDDRShadow, BYTE_OFF);
> // Or:
> for(i=0;i<8;i++) BitWrPortI(PBDDR, &PBDDRShadow, BIT_OFF, i);
> =================================================================> // Port B will be active(on) if trigger with low logic as follows:
> WrPortI(PBDDR, &PBDDRShadow, BYTE_ON);
> //Or:
> for(i=0;i<8;i++) BitWrPortI(PBDDR, &PBDDRShadow, BIT_ON, i);
>
> --- In r..., Sylvain Bissonnette wrote:
> >
> > Hi, I have a problem with the PORTB bit 0 I set this bit in output and I
> > write values but without success I don't get anything from the I/O.
> >
> > for (i=0;i<8;i++) BitWrPortI(PBDDR,&PBDDRShadow,1,i);
> >
> > while(1) WrPortI(PBDR, &PBDRShadow,i++);
> >
> > Thanks for your time
> > Sylvain Bissonnette
> >
>
start there is nothing on PB0 and DC give error "while debugging timeout"
Any Clue?
On Tue, Mar 5, 2013 at 7:40 PM, d...@ymail.com wrote:
> **
> #define BYTE_OFF 0xFF
> #define BYTE_ON 0x00
>
> #define BIT_OFF 1
> #define BIT_ON 0
>
> // Set all the Port B as outputs(default high logic):
> WrPortI(PBDDR, &PBDDRShadow, BYTE_OFF);
> // Or:
> for(i=0;i<8;i++) BitWrPortI(PBDDR, &PBDDRShadow, BIT_OFF, i);
> =================================================================> // Port B will be active(on) if trigger with low logic as follows:
> WrPortI(PBDDR, &PBDDRShadow, BYTE_ON);
> //Or:
> for(i=0;i<8;i++) BitWrPortI(PBDDR, &PBDDRShadow, BIT_ON, i);
>
> --- In r..., Sylvain Bissonnette wrote:
> >
> > Hi, I have a problem with the PORTB bit 0 I set this bit in output and I
> > write values but without success I don't get anything from the I/O.
> >
> > for (i=0;i<8;i++) BitWrPortI(PBDDR,&PBDDRShadow,1,i);
> >
> > while(1) WrPortI(PBDR, &PBDRShadow,i++);
> >
> > Thanks for your time
> > Sylvain Bissonnette
> >
>
Reply by ●March 5, 20132013-03-05
Don't the minicore modules use PB0 as the clock on the serial flash? Check
PBFR to see if it's an alternate output.
-Tom
(Sent from my phone; forgive my brevity.)
On Mar 5, 2013, at 5:41 PM, Sylvain Bissonnette wrote:
> Not work, when DC is programming flash PB0 give data, but as soon the code start there is nothing on PB0 and DC give error "while debugging timeout"
> Any Clue?
>
> On Tue, Mar 5, 2013 at 7:40 PM, d...@ymail.com wrote:
>>
>> #define BYTE_OFF 0xFF
>> #define BYTE_ON 0x00
>>
>> #define BIT_OFF 1
>> #define BIT_ON 0
>>
>> // Set all the Port B as outputs(default high logic):
>> WrPortI(PBDDR, &PBDDRShadow, BYTE_OFF);
>> // Or:
>> for(i=0;i<8;i++) BitWrPortI(PBDDR, &PBDDRShadow, BIT_OFF, i);
>> =================================================================>> // Port B will be active(on) if trigger with low logic as follows:
>> WrPortI(PBDDR, &PBDDRShadow, BYTE_ON);
>> //Or:
>> for(i=0;i<8;i++) BitWrPortI(PBDDR, &PBDDRShadow, BIT_ON, i);
>>
>> --- In r..., Sylvain Bissonnette wrote:
>> >
>> > Hi, I have a problem with the PORTB bit 0 I set this bit in output and I
>> > write values but without success I don't get anything from the I/O.
>> >
>> > for (i=0;i<8;i++) BitWrPortI(PBDDR,&PBDDRShadow,1,i);
>> >
>> > while(1) WrPortI(PBDR, &PBDRShadow,i++);
>> >
>> > Thanks for your time
>> > Sylvain Bissonnette
>> >
-Tom
(Sent from my phone; forgive my brevity.)
On Mar 5, 2013, at 5:41 PM, Sylvain Bissonnette wrote:
> Not work, when DC is programming flash PB0 give data, but as soon the code start there is nothing on PB0 and DC give error "while debugging timeout"
> Any Clue?
>
> On Tue, Mar 5, 2013 at 7:40 PM, d...@ymail.com wrote:
>>
>> #define BYTE_OFF 0xFF
>> #define BYTE_ON 0x00
>>
>> #define BIT_OFF 1
>> #define BIT_ON 0
>>
>> // Set all the Port B as outputs(default high logic):
>> WrPortI(PBDDR, &PBDDRShadow, BYTE_OFF);
>> // Or:
>> for(i=0;i<8;i++) BitWrPortI(PBDDR, &PBDDRShadow, BIT_OFF, i);
>> =================================================================>> // Port B will be active(on) if trigger with low logic as follows:
>> WrPortI(PBDDR, &PBDDRShadow, BYTE_ON);
>> //Or:
>> for(i=0;i<8;i++) BitWrPortI(PBDDR, &PBDDRShadow, BIT_ON, i);
>>
>> --- In r..., Sylvain Bissonnette wrote:
>> >
>> > Hi, I have a problem with the PORTB bit 0 I set this bit in output and I
>> > write values but without success I don't get anything from the I/O.
>> >
>> > for (i=0;i<8;i++) BitWrPortI(PBDDR,&PBDDRShadow,1,i);
>> >
>> > while(1) WrPortI(PBDR, &PBDRShadow,i++);
>> >
>> > Thanks for your time
>> > Sylvain Bissonnette
>> >
Reply by ●March 6, 20132013-03-06
I'm not a expert, the only thing I can see it's written in the
datasheet
PIN NAME SERIAL PORT EXTERNAL BUS
PB0 SCLKB IA6
On Tue, Mar 5, 2013 at 9:49 PM, Tom Collins wrote:
> **
> Don't the minicore modules use PB0 as the clock on the serial flash? Check
> PBFR to see if it's an alternate output.
>
> -Tom
> (Sent from my phone; forgive my brevity.)
>
> On Mar 5, 2013, at 5:41 PM, Sylvain Bissonnette wrote:
>
> Not work, when DC is programming flash PB0 give data, but as soon the code
> start there is nothing on PB0 and DC give error "while debugging timeout"
>
> Any Clue?
>
> On Tue, Mar 5, 2013 at 7:40 PM, d...@ymail.com wrote:
>
>> **
>> #define BYTE_OFF 0xFF
>> #define BYTE_ON 0x00
>>
>> #define BIT_OFF 1
>> #define BIT_ON 0
>>
>> // Set all the Port B as outputs(default high logic):
>> WrPortI(PBDDR, &PBDDRShadow, BYTE_OFF);
>> // Or:
>> for(i=0;i<8;i++) BitWrPortI(PBDDR, &PBDDRShadow, BIT_OFF, i);
>> =================================================================>> // Port B will be active(on) if trigger with low logic as follows:
>> WrPortI(PBDDR, &PBDDRShadow, BYTE_ON);
>> //Or:
>> for(i=0;i<8;i++) BitWrPortI(PBDDR, &PBDDRShadow, BIT_ON, i);
>>
>> --- In r..., Sylvain Bissonnette wrote:
>> >
>> > Hi, I have a problem with the PORTB bit 0 I set this bit in output and I
>> > write values but without success I don't get anything from the I/O.
>> >
>> > for (i=0;i<8;i++) BitWrPortI(PBDDR,&PBDDRShadow,1,i);
>> >
>> > while(1) WrPortI(PBDR, &PBDRShadow,i++);
>> >
>> > Thanks for your time
>> > Sylvain Bissonnette
>> >
>
>
PIN NAME SERIAL PORT EXTERNAL BUS
PB0 SCLKB IA6
On Tue, Mar 5, 2013 at 9:49 PM, Tom Collins wrote:
> **
> Don't the minicore modules use PB0 as the clock on the serial flash? Check
> PBFR to see if it's an alternate output.
>
> -Tom
> (Sent from my phone; forgive my brevity.)
>
> On Mar 5, 2013, at 5:41 PM, Sylvain Bissonnette wrote:
>
> Not work, when DC is programming flash PB0 give data, but as soon the code
> start there is nothing on PB0 and DC give error "while debugging timeout"
>
> Any Clue?
>
> On Tue, Mar 5, 2013 at 7:40 PM, d...@ymail.com wrote:
>
>> **
>> #define BYTE_OFF 0xFF
>> #define BYTE_ON 0x00
>>
>> #define BIT_OFF 1
>> #define BIT_ON 0
>>
>> // Set all the Port B as outputs(default high logic):
>> WrPortI(PBDDR, &PBDDRShadow, BYTE_OFF);
>> // Or:
>> for(i=0;i<8;i++) BitWrPortI(PBDDR, &PBDDRShadow, BIT_OFF, i);
>> =================================================================>> // Port B will be active(on) if trigger with low logic as follows:
>> WrPortI(PBDDR, &PBDDRShadow, BYTE_ON);
>> //Or:
>> for(i=0;i<8;i++) BitWrPortI(PBDDR, &PBDDRShadow, BIT_ON, i);
>>
>> --- In r..., Sylvain Bissonnette wrote:
>> >
>> > Hi, I have a problem with the PORTB bit 0 I set this bit in output and I
>> > write values but without success I don't get anything from the I/O.
>> >
>> > for (i=0;i<8;i++) BitWrPortI(PBDDR,&PBDDRShadow,1,i);
>> >
>> > while(1) WrPortI(PBDR, &PBDRShadow,i++);
>> >
>> > Thanks for your time
>> > Sylvain Bissonnette
>> >
>
>
Reply by ●March 6, 20132013-03-06
Hi to all of you,
What is wrong in my 10 line of code, Not all pine toggle
main()
{
int i;
WrPortI(SPCR, NULL, 0x84); // Port A as output
WrPortI(PBDDR, &PBDDRShadow, 0xff); // Port B as output
WrPortI(PBDDR, &PBDDRShadow, 0xff); // Port C as output
while(1)
{
WrPortI(PADR, &PADRShadow,i);
WrPortI(PBDR, &PBDRShadow,i);
WrPortI(PCDR, &PCDRShadow,i++);
}
}
> ,_._
>
What is wrong in my 10 line of code, Not all pine toggle
main()
{
int i;
WrPortI(SPCR, NULL, 0x84); // Port A as output
WrPortI(PBDDR, &PBDDRShadow, 0xff); // Port B as output
WrPortI(PBDDR, &PBDDRShadow, 0xff); // Port C as output
while(1)
{
WrPortI(PADR, &PADRShadow,i);
WrPortI(PBDR, &PBDRShadow,i);
WrPortI(PCDR, &PCDRShadow,i++);
}
}
> ,_._
>