BasicMicroUK - Forums

www.basicmicro.co.uk
It is currently Tue Oct 23, 2018 11:44 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: BasicATOM Pro 28 Module Ouput Pin Issue
PostPosted: Mon Feb 04, 2013 11:55 pm 
Offline
New User

Joined: Mon Feb 04, 2013 11:45 pm
Posts: 2
Good Afternoon,

I am having trouble getting P19 on my module to output a SCK signal for an SPI , ADC device.

My settings are

ADCSCK var byte
ADCSDO var byte
ADCCS var byte
ADCSCK = P19
ADCSDO = P17
ADCCS = P13

adcdata0 var slong

low ADCCS
shiftin ADCSDO,ADCSCK,2,[adcdata0\32]
high ADCCS

When I run the code there is absolutely no signal on P19 when measuring with a Scope. I switched to P4 and it worked. Unfortunately I cannot switch pins, since design is on PCB and other pins are already in use. I looked at Pro 28 datasheet. It states P19 can be used as a general purpose I/O. This can also be used as an interrupt. Can this be causing an issue? I tried program on a new Pro 28 Chip so we can rule out bad hardware.

Any help would be appreciated.
Mario


Top
 Profile  
 
 Post subject: Re: BasicATOM Pro 28 Module Ouput Pin Issue
PostPosted: Thu Feb 07, 2013 3:58 am 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 7:00 pm
Posts: 1316
Location: Temecula, CA
Did you test a simple program to set the pin high and low using High and Low commands?

Also just because a new module doesnt work either doesnt mean there isnt a problem. Could be something on the board shorting the pin to ground. These pins can only drive 3ma loads. All the pins on the module can drive high and low. So if you dont see them driving high and low you need to look at your board.

We ship the chips preloaded with test code that toggles every I/O pin(we use it to test the modules).

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: BasicATOM Pro 28 Module Ouput Pin Issue
PostPosted: Mon Feb 11, 2013 5:16 pm 
Offline
New User

Joined: Mon Feb 11, 2013 5:11 pm
Posts: 1
It is because the data sheet is wrong or someone messed up when writing the latest compiler. I bet if you look on P18 it is flipping correctly. I noticed commands for P19 work on P18 and commands for P18 work on P19 not the way it is supposed to. I emailed basic micro about it but got ignored. Also recently I can't read inputs from P0 and P1 correctly 3 different processors and when I use this code I can't get them to read right.

INPUT P0
INPUT P1

Main:
DEBUG [BIN P0,13]
DEBUG [BIN P1,13]
GOTO Main

I can pull P0 high or low and it never changes and always stays at 0
I can pull P1 high or low and it never changes and stays at 1

Something is up with the latest version of Basic Micro Studio.


Top
 Profile  
 
 Post subject: Re: BasicATOM Pro 28 Module Ouput Pin Issue
PostPosted: Tue Feb 12, 2013 6:08 pm 
Offline
New User

Joined: Mon Feb 04, 2013 11:45 pm
Posts: 2
>[quote="SethPM"]It is because the data sheet is wrong or someone messed up when writing the latest compiler. I bet if you look on P18 it is flipping correctly. I noticed commands for P19 work on P18 and >commands for P18 work on P19 not the way it is supposed to. I emailed basic micro about it but got ignored. Also recently I can't read inputs from P0 and P1 correctly 3 different processors and when I use this >code I can't get them to read right.

Yes, I discovered that P18 and P19 are flipped.

So

Low P19
High P19

control physical P18 and vice versa

This is an issue with compiler, or interpreter.

I didn't have issues with P0 or P1, but I am using them as Analog Inputs.


Top
 Profile  
 
 Post subject: Re: BasicATOM Pro 28 Module Ouput Pin Issue
PostPosted: Wed Feb 13, 2013 7:20 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 7:00 pm
Posts: 1316
Location: Temecula, CA
You haven't been ignored sine I'm the one you emailed at basicmicro. I've been owrking with you in this post. Were the inofrmation is available to everyone, not stuck in my email box where no one else gets the info.

The problem is the manual has it reversed or the chip definition is reversed. We haven't decided which is the case. Changing the manual is most likely though since any code currently working would get broken by changing the compiler.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO