element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
CodeBug
  • Learn
  • Learning Center
  • STEM Academy
  • CodeBug
  • More
  • Cancel
CodeBug
Blog Codebug partial teardown
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join CodeBug to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: gregoryfenton
  • Date Created: 17 Sep 2015 7:21 PM Date Created
  • Views 1123 views
  • Likes 7 likes
  • Comments 5 comments
  • code_bug
  • codebug
Related
Recommended

Codebug partial teardown

gregoryfenton
gregoryfenton
17 Sep 2015

To see this how it is meant to look, grab the text file from http://labby.co.uk/wp-content/uploads/2015/06/CodeBug-teardown.txt

Datasheet from http://ww1.microchip.com/downloads/en/DeviceDoc/30000684B.pdf

 

CodeBug teardown

CodeBug teardown

PIC18F25K50-I/ML (28 pin QFN) pinout

  2 2 2 2 2 2 2
  8 7 6 5 4 3 2
 1.            21
 2     .\\     20
 3             19
 4   18F25K50  18
 5    -I/ML    17
 6   140535K   16
 7             15
  8 9 1 1 1 1 1  
      0 1 2 3 4  

 1 RA2           8 RC0          15 RC7          22 RB4
 2 RA3           9 RC1          16 Vss          23 RB5
 3 RA4          10 RC2          17 Vdd          24 RB6
 4 RA5          11 VUSB3v3     18 RB0          25 RB7
 5 Vss          12 D-          19 RB1          26 !MCLR/Vpp/RE3
 6 RA7          13 D+          20 RB2          27 RA0
 7 RA6          14 RC6          21 RB3          28 RA1
Datasheet recommendation: Connect bottom pad to Vss

Pins by name:
ID     Pin     Altfn     Altfn     Altfn     Altfn     Altfn     Altfn     Altfn     Altfn     Altfn     Altfn     Altfn     Altfn     Altfn     Altfn     
          Analog     Compar     CTMU     SRLatch     Refernc     USB     (E)CCP     EUSART     MSSP     Timers     Intrpts     Pullup     Basic     ICD
================================================================================================================================
RA0     27     AN0     C12IN0-
================================================================================================================================
RA1     28     AN1     C12IN1-     CTCMP
================================================================================================================================
RA2      1     AN2     C2IN+               VREF-
                              DACOUT
================================================================================================================================
RA3      2     AN3     C1IN+               VREF+
================================================================================================================================
RA4      3          C1OUT          SRQ                              T0CKI
================================================================================================================================
RA5      4     Vss     C2OUT          SRNQ     HLVDIN                    !SS
================================================================================================================================
RA6      7                                                                 OSC2
                                                                      CLKO
================================================================================================================================
RA7      6                                                                 OSC1
                                                                      CLKI
================================================================================================================================
RB0     18     AN12               SRI               !FLT0          SDI          INT0     Y          
                                                  SDA                    
================================================================================================================================
RB1     19     AN10     C12IN3-                         P1C          SCK          INT1     Y          
                                                  SCL                    
================================================================================================================================
RB2     20     AN8          CTED1                    P1B                    INT2     Y          
================================================================================================================================
RB3     21     AN9     C12IN2-     CTED2                    CCP2(1)          SDO                         
================================================================================================================================
RB4     22     AN11                              P1D                    IOCB4     Y          
================================================================================================================================
RB5     23     AN13                                             T1G     IOCB5               
                                                       T3CKI(2)                    
================================================================================================================================
RB6     24                                                       IOCB6     Y     PGC     
                                                                           
================================================================================================================================
RB7     25                                                       IOCB7     Y     PGD     
================================================================================================================================
RC0      8                                                  SOSCO     IOCC0                    
                                                       T1CKI                    
                                                       T3CKI                    
                                                       T3G                    
================================================================================================================================
RC1      9                                   CCP2                    IOCC1                    
================================================================================================================================
RC2     10     AN14          CTPLS                    CCP1                    IOCC2                    
                                        P1A                                   
================================================================================================================================
     11                         VUSB3v3                                        VddCore          
================================================================================================================================
     12                         D-                              IOCC4                    
================================================================================================================================
     13                         D+                              IOCC5                    
================================================================================================================================
RC6     14     AN18                                   TX               IOCC6                    
                                             CK                              
================================================================================================================================
RC7     15     AN19                                   RX     SDO(6)          IOCC7                    
                                             DT                              
================================================================================================================================
RE3(7)     26                                                            Y     !MCLR          
                                                                      Vpp     
================================================================================================================================
Note     (1) Alternate CCP2 pin location based on Configuration bit.
     (2) Alternate T3CKI pin location based on Configuration bits.
     (6) Alternate SDO pin location based on Configuration bits.
     (7) RE3 can be used for digital input only (no output functionality).

From the above table we can determine that:
*     The extension header connects to the PIC18F as follows:
     1 CS     to     RA5 (!SS)
     2 GND     to     Vss (Ground)
     3 SDO     to     RB3 (SDO)
     4 SCL     to     RB1 (SCL)
     5 SDI/A     to     RB0 (SDI/SDA)
     6 VCC     to     Vdd (Power)
*     The ICSP header connects to the PIC18F as follows:
     1 !MCLR     to     RE3 (!MCLR)
     2 Vdd     to     Vdd (Power)
     3 Vss     to     Vss (Ground)
     4 PGD     to     RB7 (PGD)
     5 PGC     to     RB6 (PGC)
     6 PGM     to     N/C (No connection)
*     The MicroUSB connector connects to the PIC18F as follows:
     1 Power     to     Vdd (Power)
     2 D-     to     12 (D-)
     3 D+     to     13 (D+)
     4 ID     to     N/C (No connection)
     5 GND     to     Vss (Ground)

Looking now at the Blockly side of things, we can determine that connectors 0, 1, 2 and 3 are connected to port B (RB) as they can be set to pullup.
If we consider that only 0, 2 and 3 can be made pullup I would conclude the following:
*     0     to     RB4
     1     to     RB5
     2     to     RB6
     3     to     RB7
This would make sense logically as it allows the ports to be handled in one block and fits with pin 1 not being able to be a pullup pin.

I believe that the LEDs are connected in a row/column layout, with each row being turned on then turned off before moving to the next row.
I am unsure at this point whether the rows are connected to RA and the columns to RC or vice versa.
I am sure that the switches are on RA but unsure of the actual pins they connect to. This is because RC only has 5 pins available and all those would be taken up by the LEDs.

  • Sign in to reply

Top Comments

  • gregoryfenton
    gregoryfenton over 10 years ago +2
    Don't you love things that corrupt the layout
Parents
  • gregoryfenton
    gregoryfenton over 10 years ago

    Don't you love things that corrupt the layout image

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • cstanton
    cstanton over 10 years ago in reply to gregoryfenton

    Unfortunately the editor isn't WYSIWYG so you might want to edit your post and click the text in the top right of the text editor to View in HTML and sort out the formatting that way, else you can click the >> button and probably insert a table image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • cstanton
    cstanton over 10 years ago in reply to gregoryfenton

    Unfortunately the editor isn't WYSIWYG so you might want to edit your post and click the text in the top right of the text editor to View in HTML and sort out the formatting that way, else you can click the >> button and probably insert a table image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
  • gregoryfenton
    gregoryfenton over 10 years ago in reply to cstanton

    When it is a simple text document using clearly defined HTML tags such as PRE or CODE it should pass the contents through unaltered, not corrupt it.

    The issue is theirs, not mine.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • cstanton
    cstanton over 10 years ago in reply to gregoryfenton

    While I somewhat agree, and there's Feedback and Support that you can post into to comment/reflect on this, some HTML tags are stripped out by Jive for various reasons (often security) and it's not uncommon for content sites to do that with HTML code. Though this should get better if/when the site is upgraded.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Dudley
    Dudley over 10 years ago in reply to cstanton

    If after having pasted it, you select the block, click the >> button in the toolbar, and select syntax highlighting of "plain", it goes a long way to resolving some of the rendering issues.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube