Question in  EVB9S12NE64UM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Question in  EVB9S12NE64UM

8,530 Views
eg
Contributor I
hi
I am using the kit EVB9S12NE64UM , and I wonna to use port A & port B as a gereral I/O ports , when I tried to test these ports by led , I found that they always give one on all pins , even when I send zeros to them why?????
 
the second question is what is the actual voltage magnitude appeared on the port when it gives logic 1 ( 5 Volt or 3.3 Volt ) , and how can I change ????
 
plz , help , I  wonna to use these two ports separtly to control a graphic LCD
 
thanks
Ah.Kh.
Labels (1)
0 Kudos
8 Replies

673 Views
mjbcswitzerland
Specialist V

Hi

Should be easy to test outputs:
1: Just don't forget to configure as output (eg.):
#define PTG0 0x01
#define LED_1 PTG0
 PTG  |= (LED_1);                                                    // prepare output high
 DDRG |= (DEMO_LED_1);                                    // set output port bits
 PTG  ^= (DEMO_LED_1);                                      // flip output to '0'
 PTG  ^= (DEMO_LED_1);                                      // flip output back to '1'

2. The NE64 is a 3V3 device and so the output changes from 3V3 to 0V. If you need 5V then you will have to use a level converter.

Cheers

Mark Butcher
www.mjbc.ch

0 Kudos

673 Views
eg
Contributor I
hi
thanks for reply  , but my question was about port A and B  , I tried port G , it is work , actually it is the only port working , I am asking about other ports , how can I make them work ???, is there any jumber setting of something like that ???
 
thanks again
Ah.Kh.
0 Kudos

673 Views
mjbcswitzerland
Specialist V

Hi
Sorry, I thought the question was general and I missed the A+B port detail.

The EVB board has some mode jumpers and which are read on startup and configure whether port A + B are expanded bus pins or ports. I think that if you set MODA, MODB, MODC all to zero you will have real single chip mode where all ports are general purpose ports - you may have to watch with external memory devices, I have never worked with the EVB so check the manual.

Cherrs

Mark Butcher

www.mjbc.ch

 

0 Kudos

673 Views
eg
Contributor I

about level converter you told me about , is it a device I can buy it directly or a circuit and I have to assemble it ??

is there any other way instate of level converters?

thanks

Ah.Kh.

0 Kudos

673 Views
mjbcswitzerland
Specialist V

It depends on what you want to drive.

If it is a logic output requiring 5V/0V then you can use a buffer - 74HCxx - I don't know exactly which family is best suited without checking the data sheets. Just make sure that the buffer can be powered with 5V and understands the worst case logic levels supplied by the NE64 outputs (for example if the buffer required 0,7V VCC minimum to see a logic '1' then it will not work but if it needs 2,7V then it is fine).

If you are driving a load then a simple transistor/MOSFET will also be fine since it allows high voltages to be switched form a 3V3 logic output.

If you need bidirectional lines then there are some special devices with 3V3 and 5V supplies which do all conversions - can't remember their names but a search will surely find them.

If you need to read inputs of 5V logic level then a simple resistive divider will mostly be fine - eg. 18k / 33k (although the signal speed will restrict the highest resistance values which can be used). There are also some special devices, such as the 74HC4049 for converting high voltage CMOS inputs to lower logic levels.

Cheers

Mark Butcher

www.mjbc.ch

 

0 Kudos

673 Views
eg
Contributor I
hi again
 
relly , I can't find any words that explain how I thank you for your help , I finally suceeded in using of port A & B , but another strange problem appears :smileymad:
 
I used the port A to control some leds , and by using delay software , I can interchange which leds are on and which are off , and the program works , when I tried to do the same program but by using subroutines , the problem was here , the kit is not responding , and the strange thing is that when I operate the kit by the online true simulator the kit works , but in run mode no result , can you explain why ?????
 
thanks
Ah.Kh.
0 Kudos

673 Views
EMontanez
NXP Employee
NXP Employee
What is the difference between using "software delay" and "subroutines"...please elaborate?

I think you might be having a timing issue. If you blink the LEDs are too fast a rate, you will not see them. Put an osc scope on them.

When using the true-time simulator your MCU is not executing at real-time speeds therefore you are seeing the leds blink.
0 Kudos

673 Views
eg
Contributor I
thanks , for replying
0 Kudos