Diggers and button-collectors call the first button a "1-piece flat-button." The fact that yours is made of brass (not pewter) AND it has "indented" (not raised) lettering in the maker's-mark (called a backmark) on its back means it was manufactured sometime between approximately 1810 and the late-1830s. This type was mainly manufactured for use on Civilian clothing, but some did get used on Military uniforms. These plain-front 1-piece brass buttons fell out of favor with the public in the early-1840s due to the advent of inexpensively-priced "more ornate" 2-piece buttons.
The second button is called a "2-piece ball-button." (Known as a Two-piece because unlike your first button it has a separate front crimped over the edge of its back ...and the loop never counts as a "piece.") The specific version of ball-button you found dates from the 1830s and is still being manufactured today. (For example, they are used today on the uniforms of cadets at the Virginia Military Institute.) Most of the Historical ones were actually worn by civilians, although some were used on Military uniforms. In the latter case, they tended to be on Militia uniforms rather than Regular Army uniforms ...because the Army uniforms "came with" Army-emblem buttons.