Control de puertos PIC16F877A / Port Control PIC16F877A


Closed Thread
Results 1 to 10 of 10
  1. #1
    Join Date
    Aug 2012
    Location
    Comodoro Rivadavia - Patagonia Argentina
    Posts
    51

    Default Control de puertos PIC16F877A / Port Control PIC16F877A

    Hi Friend´s ... I have a question, or rather, I'm about to start, but I was not drinking any idea comes to mind.
    How could I do to control a pic 16F877A, all ports together, as read from an analog signal?
    For example, controlling the port B according bitwise analog reading is simple, but ... As could control all ports at once to build a simple LED bar?
    I know that I can implement a log shifter, but my idea is to make hardware and I have in mind to build a LED tachometer, where I have thought about implementing a LM3914 at the entrance ... The other way I have thought of doing, is directly implementing a pulse counting. As old and new vehicles are just differ in the way they could acquire the data of the amount of rpm, it occurred to me first ask how I can control all ports at once ... Now I have something armed with a comparative table and Interrupted TMR, But I control only 8 ports ... Any idea? could anyone help?
    As soon as you have finished this part, I will arm a little tutorial to explain how they work cycles of a 4-stroke engine, and are based on how to display the RPM tachometers ...
    thank you very much


    Saludos Amigos... Tengo una duda o mejor dicho, estoy por arrancar, pero no se me viene ninguna idea potable a la cabeza.
    Como podria hacer para controlar en un pic 16F877A, todos los puertos en conjunto, segun la lectura de una señal analoga?
    Por ejemplo, controlar el puerto B bit a bit segun la lectura analoga es sencillo, pero... Como podria controlar todos los puertos a la vez para poder armar una simple barra de led? Ya se que puedo implementar un desplazador de registro, pero mi idea es hacerlo por hardware ya que tengo en mente armar un tacometro a led, donde tengo pensado implementar un LM3914 a la entrada...La otra manera que tengo pensado de hacerlo, es directamente implementando un conteo de pulsos. Como los vehiculos viejos y nuevos se difieren justamente en la manera en que podria adquirir el dato de las cantidad de rpm, se me ocurrio primero preguntar como puedo controlar todos los puertos a la vez... Ya tengo algo armado con una tabla comparativa y una interrupcion por TMR; Pero solo controlo 8 puertos... Alguna idea? alguien podria ayudarme? Ni bien tenga esta parte terminada, les armare un pequeño tutorial para explicarles como funcionan los ciclos de un motor 4 tiempos, y en como se basan los tacometros para mostrar las RPM...Muchas gracias

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Control de puertos PIC16F877A / Port Control PIC16F877A

    Not sure I understand what you want but this might be close.
    http://www.picbasic.co.uk/forum/showthread.php?t=9037
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Aug 2012
    Location
    Comodoro Rivadavia - Patagonia Argentina
    Posts
    51


    Did you find this post helpful? Yes | No

    Default Re: Control de puertos PIC16F877A / Port Control PIC16F877A

    mmmm, not ... Sorry for not being very clear ... Look, what I do is similar to the tachometer:

    Name:  LED-Drehzahlmesserk2.jpg
Views: 3542
Size:  21.4 KB

    The first design tachometer, just went with 7-segment display and visualilzacion not good ... Now I would like to do it with a LED bar very similar to photo.
    regards friend

  4. #4
    Join Date
    Aug 2012
    Location
    Comodoro Rivadavia - Patagonia Argentina
    Posts
    51


    Did you find this post helpful? Yes | No

    Default Re: Control de puertos PIC16F877A / Port Control PIC16F877A

    aaaaaaaaaa but archangel opened my eyes a little file that rose ( machine tach.txt) ... What I'm going to study a little to see if it is what I play and commented glance

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Control de puertos PIC16F877A / Port Control PIC16F877A

    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Aug 2012
    Location
    Comodoro Rivadavia - Patagonia Argentina
    Posts
    51


    Did you find this post helpful? Yes | No

    Default Re: Control de puertos PIC16F877A / Port Control PIC16F877A

    good topic to which I recommend, I'll consider. It crossed my mind the idea of implementing a shift registers, but as I take all the 16F877, and reduce the hardware, I happened to see a way to control all software ports.
    I understand that tastes often bring difficulties, lol, but in this case, is also a question of space.
    regards friend

  7. #7
    Wilton55's Avatar
    Wilton55 Guest


    Did you find this post helpful? Yes | No

    Default Re: Control de puertos PIC16F877A / Port Control PIC16F877A

    I think Within the PIC, you can choose which byte of the ASCII table to recognize an action when it detects one.

  8. #8
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: Control de puertos PIC16F877A / Port Control PIC16F877A

    Quote Originally Posted by martintorres View Post
    aaaaaaaaaa but archangel opened my eyes a little file that rose ( machine tach.txt) ... What I'm going to study a little to see if it is what I play and commented glance
    I wouldn't put too much on what you found in my machine tac, it's too slow for automotive I think, you would want a timer bases counter, given the sample rate of an auto ignition. As far as the question you asked : PortB = %11111111 should set all PortB to high state. I prefer binary as I do not get confused, you could use decimal or hex as well i e . . . portb = FF or portB = 255 .
    If you use the LM3914 as you mentioned you will have an analog tach with a digital display, with all the advantages and disadvantages of both.
    Last edited by Archangel; - 2nd October 2013 at 17:59.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  9. #9
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: Control de puertos PIC16F877A / Port Control PIC16F877A

    If using hex don't you need the $ sign? For example Portb = $FF

  10. #10
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: Control de puertos PIC16F877A / Port Control PIC16F877A

    Quote Originally Posted by AvionicsMaster1 View Post
    If using hex don't you need the $ sign? For example Portb = $FF
    Yup, oversight, my bad. $FF
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts